Skip to content

Commit 4ca5fd2

Browse files
committed
Auto merge of #71232 - eddyb:print-const-adts, r=oli-obk
ty/print: pretty-print constant aggregates (arrays, tuples and ADTs). Oddly enough, we don't have any UI tests showing this off in types, only `mir-opt` tests. However, the pretty form should show up in the test output diff of #71018, if this PR is merged first. <hr/> Examples of before/after: |`Option<bool>`| |:-:| |`{transmute(0x01): std::option::Option<bool>}`| | :sparkles: ↓↓↓ :sparkles: | |`std::option::Option::<bool>::Some(true)`| | `RawVec<u32>` | |:-:| | `ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [65535], len: Size { raw: 16 } }, size: Size { raw: 16 }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }: alloc::raw_vec::RawVec::<u32>`| | :sparkles: ↓↓↓ :sparkles: | |`alloc::raw_vec::RawVec::<u32> { ptr: std::ptr::Unique::<u32> { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData::<u32> }, cap: 0usize, alloc: std::alloc::Global }`| <hr/> This PR is a prerequisite for #61486, *sort of*, in that we need to be able to pretty-print values in order to even consider how we might mangle them. We still don't have pretty-printing for constants of reference types, @oli-obk has the necessary support logic in a PR but I didn't want to interfere with that. <hr/> Each commit should be reviewed separately, as I've fixed a couple deficiencies along the way. r? @oli-obk cc @rust-lang/wg-mir-opt @varkor @yodaldevoid
2 parents 9b2f8db + eccb28e commit 4ca5fd2

21 files changed

+128
-103
lines changed

src/librustc_middle/mir/mod.rs

+17-15
Original file line numberDiff line numberDiff line change
@@ -2242,39 +2242,41 @@ impl<'tcx> Debug for Rvalue<'tcx> {
22422242
}
22432243

22442244
Aggregate(ref kind, ref places) => {
2245-
fn fmt_tuple(fmt: &mut Formatter<'_>, places: &[Operand<'_>]) -> fmt::Result {
2246-
let mut tuple_fmt = fmt.debug_tuple("");
2245+
let fmt_tuple = |fmt: &mut Formatter<'_>, name: &str| {
2246+
let mut tuple_fmt = fmt.debug_tuple(name);
22472247
for place in places {
22482248
tuple_fmt.field(place);
22492249
}
22502250
tuple_fmt.finish()
2251-
}
2251+
};
22522252

22532253
match **kind {
22542254
AggregateKind::Array(_) => write!(fmt, "{:?}", places),
22552255

2256-
AggregateKind::Tuple => match places.len() {
2257-
0 => write!(fmt, "()"),
2258-
1 => write!(fmt, "({:?},)", places[0]),
2259-
_ => fmt_tuple(fmt, places),
2260-
},
2256+
AggregateKind::Tuple => {
2257+
if places.is_empty() {
2258+
write!(fmt, "()")
2259+
} else {
2260+
fmt_tuple(fmt, "")
2261+
}
2262+
}
22612263

22622264
AggregateKind::Adt(adt_def, variant, substs, _user_ty, _) => {
22632265
let variant_def = &adt_def.variants[variant];
22642266

2265-
let f = &mut *fmt;
2266-
ty::tls::with(|tcx| {
2267+
let name = ty::tls::with(|tcx| {
2268+
let mut name = String::new();
22672269
let substs = tcx.lift(&substs).expect("could not lift for printing");
2268-
FmtPrinter::new(tcx, f, Namespace::ValueNS)
2270+
FmtPrinter::new(tcx, &mut name, Namespace::ValueNS)
22692271
.print_def_path(variant_def.def_id, substs)?;
2270-
Ok(())
2272+
Ok(name)
22712273
})?;
22722274

22732275
match variant_def.ctor_kind {
2274-
CtorKind::Const => Ok(()),
2275-
CtorKind::Fn => fmt_tuple(fmt, places),
2276+
CtorKind::Const => fmt.write_str(&name),
2277+
CtorKind::Fn => fmt_tuple(fmt, &name),
22762278
CtorKind::Fictive => {
2277-
let mut struct_fmt = fmt.debug_struct("");
2279+
let mut struct_fmt = fmt.debug_struct(&name);
22782280
for (field, place) in variant_def.fields.iter().zip(places) {
22792281
struct_fmt.field(&field.ident.as_str(), place);
22802282
}

src/librustc_middle/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ rustc_queries! {
574574
desc { "extract field of const" }
575575
}
576576

577-
/// Destructure a constant ADT or array into its variant indent and its
577+
/// Destructure a constant ADT or array into its variant index and its
578578
/// field values.
579579
query destructure_const(
580580
key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>

src/librustc_middle/ty/print/pretty.rs

+75-52
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_apfloat::Float;
99
use rustc_ast::ast;
1010
use rustc_attr::{SignedInt, UnsignedInt};
1111
use rustc_hir as hir;
12-
use rustc_hir::def::{DefKind, Namespace};
12+
use rustc_hir::def::{CtorKind, DefKind, Namespace};
1313
use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
1414
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
1515
use rustc_span::symbol::{kw, Symbol};
@@ -498,16 +498,9 @@ pub trait PrettyPrinter<'tcx>:
498498
}
499499
ty::Never => p!(write("!")),
500500
ty::Tuple(ref tys) => {
501-
p!(write("("));
502-
let mut tys = tys.iter();
503-
if let Some(&ty) = tys.next() {
504-
p!(print(ty), write(","));
505-
if let Some(&ty) = tys.next() {
506-
p!(write(" "), print(ty));
507-
for &ty in tys {
508-
p!(write(", "), print(ty));
509-
}
510-
}
501+
p!(write("("), comma_sep(tys.iter().copied()));
502+
if tys.len() == 1 {
503+
p!(write(","));
511504
}
512505
p!(write(")"))
513506
}
@@ -570,15 +563,10 @@ pub trait PrettyPrinter<'tcx>:
570563
let def_key = self.tcx().def_key(def_id);
571564
if let Some(name) = def_key.disambiguated_data.data.get_opt_name() {
572565
p!(write("{}", name));
573-
let mut substs = substs.iter();
574566
// FIXME(eddyb) print this with `print_def_path`.
575-
if let Some(first) = substs.next() {
576-
p!(write("::<"));
577-
p!(print(first));
578-
for subst in substs {
579-
p!(write(", "), print(subst));
580-
}
581-
p!(write(">"));
567+
if !substs.is_empty() {
568+
p!(write("::"));
569+
p!(generic_delimiters(|cx| cx.comma_sep(substs.iter().copied())));
582570
}
583571
return Ok(self);
584572
}
@@ -850,16 +838,12 @@ pub trait PrettyPrinter<'tcx>:
850838
) -> Result<Self, Self::Error> {
851839
define_scoped_cx!(self);
852840

853-
p!(write("("));
854-
let mut inputs = inputs.iter();
855-
if let Some(&ty) = inputs.next() {
856-
p!(print(ty));
857-
for &ty in inputs {
858-
p!(write(", "), print(ty));
859-
}
860-
if c_variadic {
861-
p!(write(", ..."));
841+
p!(write("("), comma_sep(inputs.iter().copied()));
842+
if c_variadic {
843+
if !inputs.is_empty() {
844+
p!(write(", "));
862845
}
846+
p!(write("..."));
863847
}
864848
p!(write(")"));
865849
if !output.is_unit() {
@@ -1050,19 +1034,6 @@ pub trait PrettyPrinter<'tcx>:
10501034
}
10511035
// For function type zsts just printing the path is enough
10521036
(Scalar::Raw { size: 0, .. }, ty::FnDef(d, s)) => p!(print_value_path(*d, s)),
1053-
// Empty tuples are frequently occurring, so don't print the fallback.
1054-
(Scalar::Raw { size: 0, .. }, ty::Tuple(ts)) if ts.is_empty() => p!(write("()")),
1055-
// Zero element arrays have a trivial representation.
1056-
(
1057-
Scalar::Raw { size: 0, .. },
1058-
ty::Array(
1059-
_,
1060-
ty::Const {
1061-
val: ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { data: 0, .. })),
1062-
..
1063-
},
1064-
),
1065-
) => p!(write("[]")),
10661037
// Nontrivial types with scalar bit representation
10671038
(Scalar::Raw { data, size }, _) => {
10681039
let print = |mut this: Self| {
@@ -1131,14 +1102,14 @@ pub trait PrettyPrinter<'tcx>:
11311102
define_scoped_cx!(self);
11321103

11331104
if self.tcx().sess.verbose() {
1134-
p!(write("ConstValue({:?}: {:?})", ct, ty));
1105+
p!(write("ConstValue({:?}: ", ct), print(ty), write(")"));
11351106
return Ok(self);
11361107
}
11371108

11381109
let u8_type = self.tcx().types.u8;
11391110

11401111
match (ct, &ty.kind) {
1141-
(ConstValue::Scalar(scalar), _) => self.pretty_print_const_scalar(scalar, ty, print_ty),
1112+
// Byte/string slices, printed as (byte) string literals.
11421113
(
11431114
ConstValue::Slice { data, start, end },
11441115
ty::Ref(_, ty::TyS { kind: ty::Slice(t), .. }, _),
@@ -1172,6 +1143,66 @@ pub trait PrettyPrinter<'tcx>:
11721143
p!(pretty_print_byte_str(byte_str));
11731144
Ok(self)
11741145
}
1146+
1147+
// Aggregates, printed as array/tuple/struct/variant construction syntax.
1148+
//
1149+
// NB: the `has_param_types_or_consts` check ensures that we can use
1150+
// the `destructure_const` query with an empty `ty::ParamEnv` without
1151+
// introducing ICEs (e.g. via `layout_of`) from missing bounds.
1152+
// E.g. `transmute([0usize; 2]): (u8, *mut T)` needs to know `T: Sized`
1153+
// to be able to destructure the tuple into `(0u8, *mut T)
1154+
//
1155+
// FIXME(eddyb) for `--emit=mir`/`-Z dump-mir`, we should provide the
1156+
// correct `ty::ParamEnv` to allow printing *all* constant values.
1157+
(_, ty::Array(..) | ty::Tuple(..) | ty::Adt(..)) if !ty.has_param_types_or_consts() => {
1158+
let contents = self.tcx().destructure_const(
1159+
ty::ParamEnv::reveal_all()
1160+
.and(self.tcx().mk_const(ty::Const { val: ty::ConstKind::Value(ct), ty })),
1161+
);
1162+
let fields = contents.fields.iter().copied();
1163+
1164+
match ty.kind {
1165+
ty::Array(..) => {
1166+
p!(write("["), comma_sep(fields), write("]"));
1167+
}
1168+
ty::Tuple(..) => {
1169+
p!(write("("), comma_sep(fields));
1170+
if contents.fields.len() == 1 {
1171+
p!(write(","));
1172+
}
1173+
p!(write(")"));
1174+
}
1175+
ty::Adt(def, substs) => {
1176+
let variant_def = &def.variants[contents.variant];
1177+
p!(print_value_path(variant_def.def_id, substs));
1178+
1179+
match variant_def.ctor_kind {
1180+
CtorKind::Const => {}
1181+
CtorKind::Fn => {
1182+
p!(write("("), comma_sep(fields), write(")"));
1183+
}
1184+
CtorKind::Fictive => {
1185+
p!(write(" {{ "));
1186+
let mut first = true;
1187+
for (field_def, field) in variant_def.fields.iter().zip(fields) {
1188+
if !first {
1189+
p!(write(", "));
1190+
}
1191+
p!(write("{}: ", field_def.ident), print(field));
1192+
first = false;
1193+
}
1194+
p!(write(" }}"));
1195+
}
1196+
}
1197+
}
1198+
_ => unreachable!(),
1199+
}
1200+
1201+
Ok(self)
1202+
}
1203+
1204+
(ConstValue::Scalar(scalar), _) => self.pretty_print_const_scalar(scalar, ty, print_ty),
1205+
11751206
// FIXME(oli-obk): also pretty print arrays and other aggregate constants by reading
11761207
// their fields instead of just dumping the memory.
11771208
_ => {
@@ -1910,15 +1941,7 @@ define_print_and_forward_display! {
19101941
(self, cx):
19111942

19121943
&'tcx ty::List<Ty<'tcx>> {
1913-
p!(write("{{"));
1914-
let mut tys = self.iter();
1915-
if let Some(&ty) = tys.next() {
1916-
p!(print(ty));
1917-
for &ty in tys {
1918-
p!(write(", "), print(ty));
1919-
}
1920-
}
1921-
p!(write("}}"))
1944+
p!(write("{{"), comma_sep(self.iter().copied()), write("}}"))
19221945
}
19231946

19241947
ty::TypeAndMut<'tcx> {

src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
StorageLive(_1); // bb0[0]: scope 0 at $DIR/discriminant.rs:6:9: 6:10
1616
StorageLive(_2); // bb0[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64
1717
StorageLive(_3); // bb0[2]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
18-
- _3 = std::option::Option::<bool>::Some(const true,); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
19-
+ _3 = const {transmute(0x01): std::option::Option<bool>}; // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
18+
- _3 = std::option::Option::<bool>::Some(const true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
19+
+ _3 = const std::option::Option::<bool>::Some(true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
2020
// ty::Const
2121
- // + ty: bool
2222
+ // + ty: std::option::Option<bool>

src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
StorageLive(_1); // bb0[0]: scope 0 at $DIR/discriminant.rs:6:9: 6:10
1616
StorageLive(_2); // bb0[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64
1717
StorageLive(_3); // bb0[2]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
18-
- _3 = std::option::Option::<bool>::Some(const true,); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
19-
+ _3 = const {transmute(0x01): std::option::Option<bool>}; // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
18+
- _3 = std::option::Option::<bool>::Some(const true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
19+
+ _3 = const std::option::Option::<bool>::Some(true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44
2020
// ty::Const
2121
- // + ty: bool
2222
+ // + ty: std::option::Option<bool>

src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
bb1: {
1919
StorageLive(_5); // bb1[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
2020
_5 = _2; // bb1[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
21-
- _0 = Foo::B(move _5,); // bb1[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
21+
- _0 = Foo::B(move _5); // bb1[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
2222
- StorageDead(_5); // bb1[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18
2323
- goto -> bb3; // bb1[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
2424
+ ((_0 as B).0: i32) = move _5; // bb1[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
@@ -30,7 +30,7 @@
3030
bb2: {
3131
StorageLive(_4); // bb2[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
3232
_4 = _2; // bb2[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
33-
- _0 = Foo::A(move _4,); // bb2[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
33+
- _0 = Foo::A(move _4); // bb2[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
3434
- StorageDead(_4); // bb2[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18
3535
- goto -> bb3; // bb2[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
3636
+ ((_0 as A).0: i32) = move _4; // bb2[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18

src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
StorageLive(_2); // bb0[0]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
1414
StorageLive(_3); // bb0[1]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
1515
_3 = _1; // bb0[2]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
16-
- _2 = Foo::A(move _3,); // bb0[3]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
16+
- _2 = Foo::A(move _3); // bb0[3]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
1717
- StorageDead(_3); // bb0[4]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15
1818
- StorageLive(_4); // bb0[5]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
1919
- StorageLive(_5); // bb0[6]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
2020
- _5 = _1; // bb0[7]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
21-
- _4 = Foo::A(move _5,); // bb0[8]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
21+
- _4 = Foo::A(move _5); // bb0[8]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
2222
- StorageDead(_5); // bb0[9]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26
2323
- _0 = [move _2, move _4]; // bb0[10]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:5: 10:27
2424
- StorageDead(_4); // bb0[11]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27

src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ yields ()
2121

2222
bb0: {
2323
StorageLive(_3); // bb0[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14
24-
_3 = Foo(const 5i32,); // bb0[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
24+
_3 = Foo(const 5i32); // bb0[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
2525
// ty::Const
2626
// + ty: i32
2727
// + val: Value(Scalar(0x00000005))
2828
// mir::Constant
2929
// + span: $DIR/generator-storage-dead-unwind.rs:23:21: 23:22
3030
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
3131
StorageLive(_4); // bb0[2]: scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14
32-
_4 = Bar(const 6i32,); // bb0[3]: scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
32+
_4 = Bar(const 6i32); // bb0[3]: scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
3333
// ty::Const
3434
// + ty: i32
3535
// + val: Value(Scalar(0x00000006))

src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:
3434
StorageLive(_6); // bb2[0]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
3535
StorageLive(_7); // bb2[1]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
3636
_7 = (); // bb2[2]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
37-
_0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7,); // bb2[3]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
37+
_0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7); // bb2[3]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
3838
discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}]))) = 3; // bb2[4]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
3939
return; // bb2[5]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18
4040
}

src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_2 = Box(std::vec::Vec<u32>); // bb0[2]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
2020
- (*_2) = const std::vec::Vec::<u32>::new() -> [return: bb2, unwind: bb4]; // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
2121
+ _4 = &mut (*_2); // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
22-
+ ((*_4).0: alloc::raw_vec::RawVec<u32>) = const ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }: alloc::raw_vec::RawVec::<u32>; // bb0[4]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL
22+
+ ((*_4).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: std::ptr::Unique::<u32> { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData::<u32> }, cap: 0usize, alloc: std::alloc::Global }; // bb0[4]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL
2323
// ty::Const
2424
- // + ty: fn() -> std::vec::Vec<u32> {std::vec::Vec::<u32>::new}
2525
- // + val: Value(Scalar(<ZST>))

0 commit comments

Comments
 (0)