From 4e7aaf1f448dd9808a94e98dffe4c1176c388e0d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 6 Jul 2022 10:14:46 -0400 Subject: [PATCH] tweak names and output and bless --- .../rustc_codegen_cranelift/src/constant.rs | 2 +- compiler/rustc_codegen_ssa/src/mir/operand.rs | 2 +- .../src/const_eval/eval_queries.rs | 2 +- .../src/const_eval/valtrees.rs | 2 +- .../rustc_const_eval/src/interpret/operand.rs | 2 +- .../rustc_middle/src/mir/interpret/value.rs | 6 +++--- compiler/rustc_middle/src/mir/mod.rs | 11 ++++++++-- compiler/rustc_middle/src/mir/pretty.rs | 5 +++-- .../src/build/expr/as_constant.rs | 2 +- ...implifyCfg-elaborate-drops.after.32bit.mir | 2 +- ...implifyCfg-elaborate-drops.after.64bit.mir | 2 +- .../box_expr.main.ElaborateDrops.before.mir | 6 +++--- ...primitives.{impl#0}-clone.InstCombine.diff | 6 +++--- ...motion_extern_static.BAR.PromoteTemps.diff | 2 +- ...motion_extern_static.FOO.PromoteTemps.diff | 2 +- .../const_prop/boxes.main.ConstProp.diff | 2 +- ..._prop_fails_gracefully.main.ConstProp.diff | 2 +- ...l_flow_simplification.hello.ConstProp.diff | 2 +- .../issue_66971.main.ConstProp.diff | 2 +- .../issue_67019.main.ConstProp.diff | 2 +- ...aggregate_partial_read.main.ConstProp.diff | 2 +- ...variable_unprop_assign.main.ConstProp.diff | 2 +- .../reify_fn_ptr.main.ConstProp.diff | 2 +- ...ar_literal_propagation.main.ConstProp.diff | 2 +- .../const_prop/switch_int.main.ConstProp.diff | 4 ++-- ...mplifyConstCondition-after-const-prop.diff | 4 ++-- ...le_literal_propagation.main.ConstProp.diff | 2 +- .../cycle.cycle.DeadStoreElimination.diff | 2 +- ..._line_doc_comment_2.DeduplicateBlocks.diff | 2 +- .../derefer_complex_case.main.Derefer.diff | 6 +++--- .../derefer_inline_test.main.Derefer.diff | 6 +++--- .../derefer_terminator_test.main.Derefer.diff | 4 ++-- .../branch.main.DestinationPropagation.diff | 6 +++--- ...gation_arg.bar.DestinationPropagation.diff | 2 +- ...gation_arg.foo.DestinationPropagation.diff | 2 +- .../cycle.main.DestinationPropagation.diff | 2 +- .../union.main.DestinationPropagation.diff | 2 +- ...float_to_exponential_common.ConstProp.diff | 8 +++---- ...main-{closure#0}.StateTransform.before.mir | 4 ++-- ...ny.main-{closure#0}.generator_resume.0.mir | 2 +- .../caller_with_trivial_bound.foo.Inline.diff | 2 +- src/test/mir-opt/inline/cycle.f.Inline.diff | 2 +- src/test/mir-opt/inline/cycle.g.Inline.diff | 9 ++++---- .../mir-opt/inline/cycle.main.Inline.diff | 9 ++++---- .../inline/dyn_trait.get_query.Inline.diff | 6 +++--- .../inline/dyn_trait.mk_cycle.Inline.diff | 2 +- .../dyn_trait.try_execute_query.Inline.diff | 4 ++-- .../inline_any_operand.bar.Inline.after.mir | 2 +- ...patibility.inlined_no_sanitize.Inline.diff | 2 +- ...ibility.inlined_target_feature.Inline.diff | 2 +- ...ibility.not_inlined_c_variadic.Inline.diff | 2 +- ...bility.not_inlined_no_sanitize.Inline.diff | 2 +- ...ity.not_inlined_target_feature.Inline.diff | 2 +- .../inline/inline_cycle.one.Inline.diff | 2 +- .../inline/inline_cycle.two.Inline.diff | 11 +++++----- .../inline_cycle_generic.main.Inline.diff | 2 +- .../inline/inline_diverging.f.Inline.diff | 2 +- .../inline/inline_diverging.g.Inline.diff | 4 ++-- .../inline/inline_diverging.h.Inline.diff | 21 +++++++++---------- .../inline/inline_generator.main.Inline.diff | 6 +++--- ...inline_instruction_set.default.Inline.diff | 6 +++--- .../inline_instruction_set.t32.Inline.diff | 6 +++--- ...line_into_box_place.main.Inline.32bit.diff | 6 +++--- ...line_into_box_place.main.Inline.64bit.diff | 6 +++--- .../inline_options.main.Inline.after.mir | 8 +++---- .../inline/inline_retag.bar.Inline.after.mir | 2 +- .../inline/inline_shims.clone.Inline.diff | 2 +- .../inline/inline_shims.drop.Inline.diff | 4 ++-- .../inline_specialization.main.Inline.diff | 2 +- .../inline_trait_method.test.Inline.after.mir | 2 +- ...line_trait_method_2.test2.Inline.after.mir | 2 +- .../inline/issue_78442.bar.Inline.diff | 4 ++-- .../inline/issue_78442.bar.RevealAll.diff | 6 +++--- ...ment_coverage.main.InstrumentCoverage.diff | 2 +- .../issue_41110.main.ElaborateDrops.after.mir | 4 ++-- .../issue_41110.test.ElaborateDrops.after.mir | 2 +- .../issue_41888.main.ElaborateDrops.after.mir | 2 +- .../mir-opt/issue_49232.main.mir_map.0.mir | 2 +- ...issue_62289.test.ElaborateDrops.before.mir | 6 +++--- .../issue_72181.main.mir_map.0.32bit.mir | 2 +- .../issue_72181.main.mir_map.0.64bit.mir | 2 +- .../mir-opt/issue_72181_1.main.mir_map.0.mir | 4 ++-- .../issue_73223.main.PreCodegen.32bit.diff | 2 +- .../issue_73223.main.PreCodegen.64bit.diff | 2 +- ..._73223.main.SimplifyArmIdentity.32bit.diff | 2 +- ..._73223.main.SimplifyArmIdentity.64bit.diff | 2 +- ...76432.test.SimplifyComparisonIntegral.diff | 2 +- ...ue_59352.num_to_digit.PreCodegen.after.mir | 6 +++--- ...e_75439.foo.MatchBranchSimplification.diff | 4 ++-- ...r_intrinsics.align_of.LowerIntrinsics.diff | 2 +- ...trinsics.discriminant.LowerIntrinsics.diff | 8 +++---- ...wer_intrinsics.f_u64.PreCodegen.before.mir | 2 +- ...er_intrinsics.f_unit.PreCodegen.before.mir | 7 +++++-- ...wer_intrinsics.forget.LowerIntrinsics.diff | 2 +- ..._intrinsics.non_const.LowerIntrinsics.diff | 2 +- ...er_intrinsics.size_of.LowerIntrinsics.diff | 2 +- ...ntrinsics.unreachable.LowerIntrinsics.diff | 2 +- ...r_intrinsics.wrapping.LowerIntrinsics.diff | 6 +++--- ...er_slice_len.bound.LowerSliceLenCalls.diff | 2 +- ...s.full_tested_match.PromoteTemps.after.mir | 2 +- ...full_tested_match2.PromoteTemps.before.mir | 2 +- ...h_false_edges.main.PromoteTemps.before.mir | 4 ++-- ...egion_subtyping_basic.main.nll.0.32bit.mir | 12 +++++------ ...egion_subtyping_basic.main.nll.0.64bit.mir | 12 +++++------ ...wrap.SimplifyCfg-elaborate-drops.after.mir | 2 +- ..._after_call.main.ElaborateDrops.before.mir | 4 ++-- ...receiver_ptr_mutability.main.mir_map.0.mir | 6 +++--- ...age_markers.main.RemoveStorageMarkers.diff | 2 +- ...asts.SimplifyCfg-elaborate-drops.after.mir | 6 +++--- ...place.Test.SimplifyCfg-make_shim.after.mir | 2 +- ...main.SimplifyCfg-elaborate-drops.after.mir | 6 +++--- ...mplify_cfg.main.SimplifyCfg-early-opt.diff | 2 +- ...simplify_cfg.main.SimplifyCfg-initial.diff | 2 +- ...mplifyConstCondition-after-const-prop.diff | 2 +- ...ves_unused_consts.main.SimplifyLocals.diff | 19 ++++++++++------- .../simplify_match.main.ConstProp.diff | 2 +- ...ove_out.move_out_by_subslice.mir_map.0.mir | 4 ++-- ...y_move_out.move_out_from_end.mir_map.0.mir | 4 ++-- ...reachable.main.UnreachablePropagation.diff | 2 +- ...diverging.main.UnreachablePropagation.diff | 4 ++-- ...2_.AddMovesForPackedDrops.before.32bit.mir | 2 +- ...2_.AddMovesForPackedDrops.before.64bit.mir | 2 +- ...le_storage.while_loop.PreCodegen.after.mir | 4 ++-- src/test/run-make/const_fn_mir/dump.mir | 2 +- 124 files changed, 241 insertions(+), 231 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs index 0739061fdbd7c..48972321a9f40 100644 --- a/compiler/rustc_codegen_cranelift/src/constant.rs +++ b/compiler/rustc_codegen_cranelift/src/constant.rs @@ -167,7 +167,7 @@ pub(crate) fn codegen_const_value<'tcx>( } match const_val { - ConstValue::Zst => unreachable!(), // we already handles ZST above + ConstValue::ZeroSized => unreachable!(), // we already handles ZST above ConstValue::Scalar(x) => match x { Scalar::Int(int) => { if fx.clif_type(layout.ty).is_some() { diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs index af15ae36fa973..c612634fce2a6 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -84,7 +84,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> { let llval = bx.scalar_to_backend(x, scalar, bx.immediate_backend_type(layout)); OperandValue::Immediate(llval) } - ConstValue::Zst => { + ConstValue::ZeroSized => { let llval = bx.zst_to_backend(bx.immediate_backend_type(layout)); OperandValue::Immediate(llval) } diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs index d3ebfd715c0d7..b18976302b4ff 100644 --- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs @@ -157,7 +157,7 @@ pub(super) fn op_to_const<'tcx>( "this MPlaceTy must come from a validated constant, thus we can assume the \ alignment is correct", ); - ConstValue::Zst + ConstValue::ZeroSized } } }; diff --git a/compiler/rustc_const_eval/src/const_eval/valtrees.rs b/compiler/rustc_const_eval/src/const_eval/valtrees.rs index c2978e0d4f891..2288a4e7b6c78 100644 --- a/compiler/rustc_const_eval/src/const_eval/valtrees.rs +++ b/compiler/rustc_const_eval/src/const_eval/valtrees.rs @@ -272,7 +272,7 @@ pub fn valtree_to_const_value<'tcx>( match ty.kind() { ty::FnDef(..) => { assert!(valtree.unwrap_branch().is_empty()); - ConstValue::Zst + ConstValue::ZeroSized } ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Char => match valtree { ty::ValTree::Leaf(scalar_int) => ConstValue::Scalar(Scalar::Int(scalar_int)), diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index 236849f5f9f2f..d11ae7b4925df 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -709,7 +709,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { Operand::Indirect(MemPlace::from_ptr(ptr.into())) } ConstValue::Scalar(x) => Operand::Immediate(tag_scalar(x)?.into()), - ConstValue::Zst => Operand::Immediate(Immediate::Uninit), + ConstValue::ZeroSized => Operand::Immediate(Immediate::Uninit), ConstValue::Slice { data, start, end } => { // We rely on mutability being set correctly in `data` to prevent writes // where none should happen. diff --git a/compiler/rustc_middle/src/mir/interpret/value.rs b/compiler/rustc_middle/src/mir/interpret/value.rs index e38e4fc54c52d..22bbe29c10555 100644 --- a/compiler/rustc_middle/src/mir/interpret/value.rs +++ b/compiler/rustc_middle/src/mir/interpret/value.rs @@ -35,7 +35,7 @@ pub enum ConstValue<'tcx> { Scalar(Scalar), /// Only used for ZSTs. - Zst, + ZeroSized, /// Used only for `&[u8]` and `&str` Slice { data: ConstAllocation<'tcx>, start: usize, end: usize }, @@ -58,7 +58,7 @@ impl<'a, 'tcx> Lift<'tcx> for ConstValue<'a> { fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option> { Some(match self { ConstValue::Scalar(s) => ConstValue::Scalar(s), - ConstValue::Zst => ConstValue::Zst, + ConstValue::ZeroSized => ConstValue::ZeroSized, ConstValue::Slice { data, start, end } => { ConstValue::Slice { data: tcx.lift(data)?, start, end } } @@ -73,7 +73,7 @@ impl<'tcx> ConstValue<'tcx> { #[inline] pub fn try_to_scalar(&self) -> Option> { match *self { - ConstValue::ByRef { .. } | ConstValue::Slice { .. } | ConstValue::Zst => None, + ConstValue::ByRef { .. } | ConstValue::Slice { .. } | ConstValue::ZeroSized => None, ConstValue::Scalar(val) => Some(val), } } diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 066cb4d20578b..fc8b3112b871f 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1711,7 +1711,7 @@ impl<'tcx> Operand<'tcx> { Operand::Constant(Box::new(Constant { span, user_ty: None, - literal: ConstantKind::Val(ConstValue::Zst, ty), + literal: ConstantKind::Val(ConstValue::ZeroSized, ty), })) } @@ -2196,7 +2196,7 @@ impl<'tcx> ConstantKind<'tcx> { #[inline] pub fn zero_sized(ty: Ty<'tcx>) -> Self { - let cv = ConstValue::Zst; + let cv = ConstValue::ZeroSized; Self::Val(cv, ty) } @@ -2772,6 +2772,13 @@ fn pretty_print_const_value<'tcx>( fmt.write_str(&cx.into_buffer())?; return Ok(()); } + (ConstValue::ZeroSized, ty::FnDef(d, s)) => { + let mut cx = FmtPrinter::new(tcx, Namespace::ValueNS); + cx.print_alloc_ids = true; + let cx = cx.print_value_path(*d, s)?; + fmt.write_str(&cx.into_buffer())?; + return Ok(()); + } // FIXME(oli-obk): also pretty print arrays and other aggregate constants by reading // their fields instead of just dumping the memory. _ => {} diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 07a3c8cf7bb0f..e2fa37ee7be80 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -448,8 +448,9 @@ impl<'tcx> Visitor<'tcx> for ExtraComments<'tcx> { self.push(&format!("+ user_ty: {:?}", user_ty)); } + // FIXME: this is a poor version of `pretty_print_const_value`. let fmt_val = |val: &ConstValue<'tcx>| match val { - ConstValue::Zst => format!("ZST"), + ConstValue::ZeroSized => format!(""), ConstValue::Scalar(s) => format!("Scalar({:?})", s), ConstValue::Slice { .. } => format!("Slice(..)"), ConstValue::ByRef { .. } => format!("ByRef(..)"), @@ -680,7 +681,7 @@ pub fn write_allocations<'tcx>( ConstValue::Scalar(interpret::Scalar::Int { .. }) => { Either::Left(Either::Right(std::iter::empty())) } - ConstValue::Zst => Either::Left(Either::Right(std::iter::empty())), + ConstValue::ZeroSized => Either::Left(Either::Right(std::iter::empty())), ConstValue::ByRef { alloc, .. } | ConstValue::Slice { data: alloc, .. } => { Either::Right(alloc_ids_from_alloc(alloc)) } diff --git a/compiler/rustc_mir_build/src/build/expr/as_constant.rs b/compiler/rustc_mir_build/src/build/expr/as_constant.rs index 063500c9187dc..648d10b9e42a8 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_constant.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_constant.rs @@ -61,7 +61,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { inferred_ty: ty, }) }); - let literal = ConstantKind::Val(ConstValue::Zst, ty); + let literal = ConstantKind::Val(ConstValue::ZeroSized, ty); Constant { span, user_ty: user_ty, literal } } diff --git a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir index deb5dbad7de67..c8848caa02709 100644 --- a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir +++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir @@ -39,7 +39,7 @@ fn main() -> () { _5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 // mir::Constant // + span: $DIR/array-index-is-temporary.rs:16:21: 16:24 - // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.64bit.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.64bit.mir index deb5dbad7de67..c8848caa02709 100644 --- a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.64bit.mir +++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.64bit.mir @@ -39,7 +39,7 @@ fn main() -> () { _5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 // mir::Constant // + span: $DIR/array-index-is-temporary.rs:16:21: 16:24 - // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir index 5b1ffc76fe5b3..9b35beccbcc5a 100644 --- a/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir @@ -22,7 +22,7 @@ fn main() -> () { _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/box_expr.rs:7:13: 7:25 // mir::Constant // + span: $DIR/box_expr.rs:7:13: 7:25 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -31,7 +31,7 @@ fn main() -> () { (*_5) = S::new() -> [return: bb2, unwind: bb8]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25 // mir::Constant // + span: $DIR/box_expr.rs:7:17: 7:23 - // + literal: Const { ty: fn() -> S {S::new}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> S {S::new}, val: Value() } } bb2: { @@ -47,7 +47,7 @@ fn main() -> () { _6 = std::mem::drop::>(move _7) -> [return: bb4, unwind: bb6]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12 // mir::Constant // + span: $DIR/box_expr.rs:8:5: 8:9 - // + literal: Const { ty: fn(Box) {std::mem::drop::>}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Box) {std::mem::drop::>}, val: Value() } } bb4: { diff --git a/src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff b/src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff index b1ff480324f6b..7ecd67d7c679a 100644 --- a/src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff +++ b/src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff @@ -24,7 +24,7 @@ _2 = ::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9 // mir::Constant // + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9 - // + literal: Const { ty: for<'r> fn(&'r T) -> T {::clone}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r T) -> T {::clone}, val: Value() } } bb1: { @@ -37,7 +37,7 @@ - _5 = ::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11 - // mir::Constant - // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11 -- // + literal: Const { ty: for<'r> fn(&'r u64) -> u64 {::clone}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r u64) -> u64 {::clone}, val: Value() } + _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11 + _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11 + goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11 @@ -53,7 +53,7 @@ - _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16 - // mir::Constant - // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16 -- // + literal: Const { ty: for<'r> fn(&'r [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value() } + _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16 + _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16 + goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16 diff --git a/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff index 268d8f464646f..bc82222d11856 100644 --- a/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff +++ b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff @@ -33,7 +33,7 @@ _0 = core::slice::::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44 // mir::Constant // + span: $DIR/const-promotion-extern-static.rs:9:36: 9:42 - // + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff index 322a1b206f948..39dcf2f10c6f2 100644 --- a/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff +++ b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff @@ -35,7 +35,7 @@ _0 = core::slice::::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55 // mir::Constant // + span: $DIR/const-promotion-extern-static.rs:13:47: 13:53 - // + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff index 87302424914d9..919b909435197 100644 --- a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff @@ -32,7 +32,7 @@ + _6 = alloc::alloc::exchange_malloc(const 4_usize, const 4_usize) -> bb1; // scope 2 at $DIR/boxes.rs:12:14: 12:22 // mir::Constant // + span: $DIR/boxes.rs:12:14: 12:22 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff index 84d72202d527e..852a2419f558d 100644 --- a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff @@ -30,7 +30,7 @@ _4 = read(move _5) -> bb1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12 // mir::Constant // + span: $DIR/const_prop_fails_gracefully.rs:8:5: 8:9 - // + literal: Const { ty: fn(usize) {read}, val: Value(Scalar()) } + // + literal: Const { ty: fn(usize) {read}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff index d7636c817099a..d0287cc2b2b64 100644 --- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff +++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff @@ -19,7 +19,7 @@ _2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/panic.rs:LL:COL - // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value() } // mir::Constant // + span: $SRC_DIR/std/src/panic.rs:LL:COL // + literal: Const { ty: &str, val: Value(Slice(..)) } diff --git a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff index e874adebbe01b..5991d7637f50f 100644 --- a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff @@ -20,7 +20,7 @@ _1 = encode(move _2) -> bb1; // scope 0 at $DIR/issue-66971.rs:16:5: 16:23 // mir::Constant // + span: $DIR/issue-66971.rs:16:5: 16:11 - // + literal: Const { ty: fn(((), u8, u8)) {encode}, val: Value(Scalar()) } + // + literal: Const { ty: fn(((), u8, u8)) {encode}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff index 69d31b681b4e5..149a60c0bbb54 100644 --- a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff @@ -21,7 +21,7 @@ _1 = test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:11:5: 11:20 // mir::Constant // + span: $DIR/issue-67019.rs:11:5: 11:9 - // + literal: Const { ty: fn(((u8, u8),)) {test}, val: Value(Scalar()) } + // + literal: Const { ty: fn(((u8, u8),)) {test}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff index 86fac1270d0fc..724cf096f5946 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff @@ -17,7 +17,7 @@ _1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:5:29: 5:34 // mir::Constant // + span: $DIR/mutable_variable_aggregate_partial_read.rs:5:29: 5:32 - // + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff index 247d8f32432c0..a22efa7eaf50a 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff @@ -26,7 +26,7 @@ _1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:5:13: 5:18 // mir::Constant // + span: $DIR/mutable_variable_unprop_assign.rs:5:13: 5:16 - // + literal: Const { ty: fn() -> i32 {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> i32 {foo}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff b/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff index 037febdf3a579..80f461a4c02cf 100644 --- a/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff @@ -16,7 +16,7 @@ _3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17 // mir::Constant // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17 - // + literal: Const { ty: fn() {main}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {main}, val: Value() } _2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26 StorageDead(_3); // scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26 _1 = move _2 as *const fn() (PointerFromExposedAddress); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41 diff --git a/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff index af48ff0b098e7..6343ee80a2562 100644 --- a/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff @@ -21,7 +21,7 @@ + _2 = consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15 // mir::Constant // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:12 - // + literal: Const { ty: fn(u32) {consume}, val: Value(Scalar()) } + // + literal: Const { ty: fn(u32) {consume}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff index f031a703a9d72..5dfa05a46d377 100644 --- a/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff @@ -16,14 +16,14 @@ _0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21 // mir::Constant // + span: $DIR/switch_int.rs:9:14: 9:17 - // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) {foo}, val: Value() } } bb2: { _0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20 // mir::Constant // + span: $DIR/switch_int.rs:8:14: 8:17 - // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) {foo}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff b/src/test/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff index f2b02551146eb..704b4bbe018d5 100644 --- a/src/test/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff +++ b/src/test/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff @@ -16,14 +16,14 @@ _0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21 // mir::Constant // + span: $DIR/switch_int.rs:9:14: 9:17 - // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) {foo}, val: Value() } } bb2: { _0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20 // mir::Constant // + span: $DIR/switch_int.rs:8:14: 8:17 - // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) {foo}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff index 2bcd10f160b82..adb182314ac5e 100644 --- a/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff @@ -22,7 +22,7 @@ _2 = consume(move _3) -> bb1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15 // mir::Constant // + span: $DIR/tuple_literal_propagation.rs:5:5: 5:12 - // + literal: Const { ty: fn((u32, u32)) {consume}, val: Value(Scalar()) } + // + literal: Const { ty: fn((u32, u32)) {consume}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination.diff b/src/test/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination.diff index 6037f89086dc1..5f8019ac975a3 100644 --- a/src/test/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination.diff +++ b/src/test/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination.diff @@ -28,7 +28,7 @@ _5 = cond() -> bb2; // scope 0 at $DIR/cycle.rs:12:11: 12:17 // mir::Constant // + span: $DIR/cycle.rs:12:11: 12:15 - // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {cond}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff b/src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff index 372b14eb7c92a..688015f68d37e 100644 --- a/src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff +++ b/src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff @@ -27,7 +27,7 @@ + _2 = transmute::<&str, &[u8]>(move _8) -> bb12; // scope 2 at $SRC_DIR/core/src/str/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/str/mod.rs:LL:COL - // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&str) -> &[u8] {transmute::<&str, &[u8]>}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&str) -> &[u8] {transmute::<&str, &[u8]>}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/derefer_complex_case.main.Derefer.diff b/src/test/mir-opt/derefer_complex_case.main.Derefer.diff index f5eabf8696796..571efc9117102 100644 --- a/src/test/mir-opt/derefer_complex_case.main.Derefer.diff +++ b/src/test/mir-opt/derefer_complex_case.main.Derefer.diff @@ -36,7 +36,7 @@ _1 = <&[i32; 2] as IntoIterator>::into_iter(move _2) -> bb1; // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26 // mir::Constant // + span: $DIR/derefer_complex_case.rs:4:17: 4:26 - // + literal: Const { ty: fn(&[i32; 2]) -> <&[i32; 2] as IntoIterator>::IntoIter {<&[i32; 2] as IntoIterator>::into_iter}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&[i32; 2]) -> <&[i32; 2] as IntoIterator>::IntoIter {<&[i32; 2] as IntoIterator>::into_iter}, val: Value() } } bb1: { @@ -56,7 +56,7 @@ _7 = as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26 // mir::Constant // + span: $DIR/derefer_complex_case.rs:4:17: 4:26 - // + literal: Const { ty: for<'r> fn(&'r mut std::slice::Iter) -> Option< as Iterator>::Item> { as Iterator>::next}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r mut std::slice::Iter) -> Option< as Iterator>::Item> { as Iterator>::next}, val: Value() } } bb3: { @@ -77,7 +77,7 @@ _6 = std::mem::drop::(move _13) -> bb7; // scope 2 at $DIR/derefer_complex_case.rs:4:29: 4:38 // mir::Constant // + span: $DIR/derefer_complex_case.rs:4:29: 4:33 - // + literal: Const { ty: fn(i32) {std::mem::drop::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) {std::mem::drop::}, val: Value() } } bb5: { diff --git a/src/test/mir-opt/derefer_inline_test.main.Derefer.diff b/src/test/mir-opt/derefer_inline_test.main.Derefer.diff index e131adae2b683..09cce1c165442 100644 --- a/src/test/mir-opt/derefer_inline_test.main.Derefer.diff +++ b/src/test/mir-opt/derefer_inline_test.main.Derefer.diff @@ -19,7 +19,7 @@ _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12 // mir::Constant // + span: $DIR/derefer_inline_test.rs:10:5: 10:12 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -28,7 +28,7 @@ (*_5) = f() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:10:9: 10:12 // mir::Constant // + span: $DIR/derefer_inline_test.rs:10:9: 10:10 - // + literal: Const { ty: fn() -> Box {f}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> Box {f}, val: Value() } } bb2: { @@ -59,7 +59,7 @@ _6 = alloc::alloc::box_free::, std::alloc::Global>(move (_5.0: std::ptr::Unique>), move (_5.1: std::alloc::Global)) -> bb6; // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12 // mir::Constant // + span: $DIR/derefer_inline_test.rs:10:11: 10:12 - // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value() } } bb8 (cleanup): { diff --git a/src/test/mir-opt/derefer_terminator_test.main.Derefer.diff b/src/test/mir-opt/derefer_terminator_test.main.Derefer.diff index 8b91a65bf3d7d..cb110afe0190c 100644 --- a/src/test/mir-opt/derefer_terminator_test.main.Derefer.diff +++ b/src/test/mir-opt/derefer_terminator_test.main.Derefer.diff @@ -33,7 +33,7 @@ _1 = foo() -> bb1; // scope 0 at $DIR/derefer_terminator_test.rs:3:13: 3:18 // mir::Constant // + span: $DIR/derefer_terminator_test.rs:3:13: 3:16 - // + literal: Const { ty: fn() -> bool {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {foo}, val: Value() } } bb1: { @@ -41,7 +41,7 @@ _2 = foo() -> bb2; // scope 1 at $DIR/derefer_terminator_test.rs:4:13: 4:18 // mir::Constant // + span: $DIR/derefer_terminator_test.rs:4:13: 4:16 - // + literal: Const { ty: fn() -> bool {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {foo}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff index c3aa19e6c5f84..97fb7fce14e40 100644 --- a/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff +++ b/src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff @@ -19,7 +19,7 @@ _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18 // mir::Constant // + span: $DIR/branch.rs:13:13: 13:16 - // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> i32 {val}, val: Value() } } bb1: { @@ -28,7 +28,7 @@ _3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22 // mir::Constant // + span: $DIR/branch.rs:15:16: 15:20 - // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {cond}, val: Value() } } bb2: { @@ -45,7 +45,7 @@ _4 = val() -> bb5; // scope 1 at $DIR/branch.rs:18:9: 18:14 // mir::Constant // + span: $DIR/branch.rs:18:9: 18:12 - // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> i32 {val}, val: Value() } } bb5: { diff --git a/src/test/mir-opt/dest-prop/copy_propagation_arg.bar.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/copy_propagation_arg.bar.DestinationPropagation.diff index 3f9ba4ad4f0ac..11a0d1f609f72 100644 --- a/src/test/mir-opt/dest-prop/copy_propagation_arg.bar.DestinationPropagation.diff +++ b/src/test/mir-opt/dest-prop/copy_propagation_arg.bar.DestinationPropagation.diff @@ -14,7 +14,7 @@ _2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 // mir::Constant // + span: $DIR/copy_propagation_arg.rs:16:5: 16:10 - // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar()) } + // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.diff index 963881d7ae062..1346a04938a20 100644 --- a/src/test/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.diff +++ b/src/test/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.diff @@ -14,7 +14,7 @@ _2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 // mir::Constant // + span: $DIR/copy_propagation_arg.rs:11:9: 11:14 - // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar()) } + // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff index 8e44d68d9348e..516180fbec68d 100644 --- a/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff +++ b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff @@ -27,7 +27,7 @@ _1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22 // mir::Constant // + span: $DIR/cycle.rs:9:17: 9:20 - // + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> i32 {val}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff index 582a1738cbf96..acfd3c18fc930 100644 --- a/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff +++ b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff @@ -22,7 +22,7 @@ _2 = val() -> bb1; // scope 0 at $DIR/union.rs:13:23: 13:28 // mir::Constant // + span: $DIR/union.rs:13:23: 13:26 - // + literal: Const { ty: fn() -> u32 {val}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> u32 {val}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff index 15409fa0dd23c..a930d83b9e798 100644 --- a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff +++ b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff @@ -41,7 +41,7 @@ _4 = Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:15:22: 15:37 // mir::Constant // + span: $DIR/funky_arms.rs:15:26: 15:35 - // + literal: Const { ty: for<'r> fn(&'r Formatter) -> bool {Formatter::sign_plus}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r Formatter) -> bool {Formatter::sign_plus}, val: Value() } } bb1: { @@ -69,7 +69,7 @@ _7 = Formatter::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:24:30: 24:45 // mir::Constant // + span: $DIR/funky_arms.rs:24:34: 24:43 - // + literal: Const { ty: for<'r> fn(&'r Formatter) -> Option {Formatter::precision}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r Formatter) -> Option {Formatter::precision}, val: Value() } } bb5: { @@ -100,7 +100,7 @@ _0 = float_to_exponential_common_exact::(move _11, move _12, move _13, move _14, move _17) -> bb7; // scope 3 at $DIR/funky_arms.rs:26:9: 26:87 // mir::Constant // + span: $DIR/funky_arms.rs:26:9: 26:42 - // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::}, val: Value() } } bb7: { @@ -125,7 +125,7 @@ _0 = float_to_exponential_common_shortest::(move _18, move _19, move _20, move _21) -> bb9; // scope 2 at $DIR/funky_arms.rs:28:9: 28:68 // mir::Constant // + span: $DIR/funky_arms.rs:28:9: 28:45 - // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut Formatter<'s>, &'t0 T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::}, val: Value() } } bb9: { diff --git a/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir b/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir index 9abb0cf2046bd..af4ed32c50889 100644 --- a/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir +++ b/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir @@ -41,7 +41,7 @@ yields () _7 = take::(move _8) -> [return: bb2, unwind: bb9]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:9: 26:16 // mir::Constant // + span: $DIR/generator-storage-dead-unwind.rs:26:9: 26:13 - // + literal: Const { ty: fn(Foo) {take::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Foo) {take::}, val: Value() } } bb2: { @@ -53,7 +53,7 @@ yields () _9 = take::(move _10) -> [return: bb3, unwind: bb8]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:9: 27:16 // mir::Constant // + span: $DIR/generator-storage-dead-unwind.rs:27:9: 27:13 - // + literal: Const { ty: fn(Bar) {take::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Bar) {take::}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir b/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir index ce587433617f5..16fa432dc3ad3 100644 --- a/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir +++ b/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir @@ -61,7 +61,7 @@ fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 19:24 _8 = callee() -> bb4; // scope 1 at $DIR/generator-tiny.rs:23:13: 23:21 // mir::Constant // + span: $DIR/generator-tiny.rs:23:13: 23:19 - // + literal: Const { ty: fn() {callee}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {callee}, val: Value() } } bb4: { diff --git a/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff b/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff index 5d236373a4ce0..d30c74897b342 100644 --- a/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff +++ b/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff @@ -13,7 +13,7 @@ _1 = bar::() -> bb1; // scope 0 at $DIR/caller-with-trivial-bound.rs:20:51: 20:61 // mir::Constant // + span: $DIR/caller-with-trivial-bound.rs:20:51: 20:59 - // + literal: Const { ty: fn() -> >::Item {bar::}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> >::Item {bar::}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/cycle.f.Inline.diff b/src/test/mir-opt/inline/cycle.f.Inline.diff index d42b8397c505e..1376ba99d992c 100644 --- a/src/test/mir-opt/inline/cycle.f.Inline.diff +++ b/src/test/mir-opt/inline/cycle.f.Inline.diff @@ -17,7 +17,7 @@ _2 = >::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:6:5: 6:8 // mir::Constant // + span: $DIR/cycle.rs:6:5: 6:6 - // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> >::Output {>::call}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> >::Output {>::call}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/cycle.g.Inline.diff b/src/test/mir-opt/inline/cycle.g.Inline.diff index 450157e64284f..5a8c147a32723 100644 --- a/src/test/mir-opt/inline/cycle.g.Inline.diff +++ b/src/test/mir-opt/inline/cycle.g.Inline.diff @@ -5,11 +5,11 @@ let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:11:8: 11:8 let _1: (); // in scope 0 at $DIR/cycle.rs:12:5: 12:12 + let mut _2: fn() {main}; // in scope 0 at $DIR/cycle.rs:12:5: 12:12 -+ let mut _5: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 + scope 1 (inlined f::) { // at $DIR/cycle.rs:12:5: 12:12 + debug g => _2; // in scope 1 at $DIR/cycle.rs:5:6: 5:7 + let _3: (); // in scope 1 at $DIR/cycle.rs:6:5: 6:8 + let mut _4: &fn() {main}; // in scope 1 at $DIR/cycle.rs:6:5: 6:6 ++ let mut _5: (); // in scope 1 at $DIR/cycle.rs:6:5: 6:8 + scope 2 (inlined >::call - shim(fn() {main})) { // at $DIR/cycle.rs:6:5: 6:8 + } + } @@ -21,15 +21,14 @@ + _2 = main; // scope 0 at $DIR/cycle.rs:12:5: 12:12 // mir::Constant - // + span: $DIR/cycle.rs:12:5: 12:6 -- // + literal: Const { ty: fn(fn() {main}) {f::}, val: Value(Scalar()) } +- // + literal: Const { ty: fn(fn() {main}) {f::}, val: Value() } - // mir::Constant // + span: $DIR/cycle.rs:12:7: 12:11 - // + literal: Const { ty: fn() {main}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {main}, val: Value() } + StorageLive(_3); // scope 1 at $DIR/cycle.rs:6:5: 6:8 + StorageLive(_4); // scope 1 at $DIR/cycle.rs:6:5: 6:6 + _4 = &_2; // scope 1 at $DIR/cycle.rs:6:5: 6:6 + StorageLive(_5); // scope 1 at $DIR/cycle.rs:6:5: 6:8 -+ _5 = const (); // scope 1 at $DIR/cycle.rs:6:5: 6:8 + _3 = move (*_4)() -> [return: bb4, unwind: bb2]; // scope 2 at $SRC_DIR/core/src/ops/function.rs:LL:COL } @@ -49,7 +48,7 @@ + } + + bb4: { -+ StorageDead(_5); // scope 1 at $DIR/cycle.rs:6:5: 6:8 ++ StorageDead(_5); // scope 1 at $DIR/cycle.rs:6:7: 6:8 + StorageDead(_4); // scope 1 at $DIR/cycle.rs:6:7: 6:8 + StorageDead(_3); // scope 1 at $DIR/cycle.rs:6:8: 6:9 + drop(_2) -> bb1; // scope 1 at $DIR/cycle.rs:7:1: 7:2 diff --git a/src/test/mir-opt/inline/cycle.main.Inline.diff b/src/test/mir-opt/inline/cycle.main.Inline.diff index 5e2f70799e41e..e102c65090587 100644 --- a/src/test/mir-opt/inline/cycle.main.Inline.diff +++ b/src/test/mir-opt/inline/cycle.main.Inline.diff @@ -5,11 +5,11 @@ let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:16:11: 16:11 let _1: (); // in scope 0 at $DIR/cycle.rs:17:5: 17:9 + let mut _2: fn() {g}; // in scope 0 at $DIR/cycle.rs:17:5: 17:9 -+ let mut _5: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 + scope 1 (inlined f::) { // at $DIR/cycle.rs:17:5: 17:9 + debug g => _2; // in scope 1 at $DIR/cycle.rs:5:6: 5:7 + let _3: (); // in scope 1 at $DIR/cycle.rs:6:5: 6:8 + let mut _4: &fn() {g}; // in scope 1 at $DIR/cycle.rs:6:5: 6:6 ++ let mut _5: (); // in scope 1 at $DIR/cycle.rs:6:5: 6:8 + scope 2 (inlined >::call - shim(fn() {g})) { // at $DIR/cycle.rs:6:5: 6:8 + scope 3 (inlined g) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL + let mut _6: fn() {main}; // in scope 3 at $DIR/cycle.rs:12:5: 12:12 @@ -31,15 +31,14 @@ + _2 = g; // scope 0 at $DIR/cycle.rs:17:5: 17:9 // mir::Constant - // + span: $DIR/cycle.rs:17:5: 17:6 -- // + literal: Const { ty: fn(fn() {g}) {f::}, val: Value(Scalar()) } +- // + literal: Const { ty: fn(fn() {g}) {f::}, val: Value() } - // mir::Constant // + span: $DIR/cycle.rs:17:7: 17:8 - // + literal: Const { ty: fn() {g}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {g}, val: Value() } + StorageLive(_3); // scope 1 at $DIR/cycle.rs:6:5: 6:8 + StorageLive(_4); // scope 1 at $DIR/cycle.rs:6:5: 6:6 + _4 = &_2; // scope 1 at $DIR/cycle.rs:6:5: 6:6 + StorageLive(_5); // scope 1 at $DIR/cycle.rs:6:5: 6:8 -+ _5 = const (); // scope 1 at $DIR/cycle.rs:6:5: 6:8 + StorageLive(_6); // scope 3 at $DIR/cycle.rs:12:5: 12:12 + StorageLive(_7); // scope 4 at $DIR/cycle.rs:6:5: 6:8 + StorageLive(_8); // scope 4 at $DIR/cycle.rs:6:5: 6:6 @@ -66,7 +65,7 @@ + StorageDead(_8); // scope 4 at $DIR/cycle.rs:6:7: 6:8 + StorageDead(_7); // scope 4 at $DIR/cycle.rs:6:8: 6:9 + StorageDead(_6); // scope 3 at $DIR/cycle.rs:12:5: 12:12 -+ StorageDead(_5); // scope 1 at $DIR/cycle.rs:6:5: 6:8 ++ StorageDead(_5); // scope 1 at $DIR/cycle.rs:6:7: 6:8 + StorageDead(_4); // scope 1 at $DIR/cycle.rs:6:7: 6:8 + StorageDead(_3); // scope 1 at $DIR/cycle.rs:6:8: 6:9 + drop(_2) -> bb1; // scope 1 at $DIR/cycle.rs:7:1: 7:2 diff --git a/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff b/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff index d1ab29b8a21ab..7b306dd9482ca 100644 --- a/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff +++ b/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff @@ -28,7 +28,7 @@ // mir::Constant // + span: $DIR/dyn-trait.rs:33:13: 33:21 // + user_ty: UserType(0) - // + literal: Const { ty: for<'r> fn(&'r T) -> &'r ::C {::cache::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r T) -> &'r ::C {::cache::}, val: Value() } } bb1: { @@ -46,9 +46,9 @@ + _0 = ::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22 // mir::Constant - // + span: $DIR/dyn-trait.rs:34:5: 34:22 -- // + literal: Const { ty: for<'r> fn(&'r ::C) {try_execute_query::<::C>}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r ::C) {try_execute_query::<::C>}, val: Value() } + // + span: $DIR/dyn-trait.rs:21:7: 21:20 -+ // + literal: Const { ty: for<'r> fn(&'r dyn Cache::V>) {::V> as Cache>::store_nocache}, val: Value(Scalar()) } ++ // + literal: Const { ty: for<'r> fn(&'r dyn Cache::V>) {::V> as Cache>::store_nocache}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff b/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff index 27309328052c7..2a909702a6dc0 100644 --- a/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff +++ b/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff @@ -12,7 +12,7 @@ _0 = as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:21:5: 21:22 // mir::Constant // + span: $DIR/dyn-trait.rs:21:7: 21:20 - // + literal: Const { ty: for<'r> fn(&'r dyn Cache) { as Cache>::store_nocache}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r dyn Cache) { as Cache>::store_nocache}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff b/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff index 0c44c3ada0f8c..01ebc999cb3ec 100644 --- a/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff +++ b/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff @@ -23,9 +23,9 @@ + _0 = ::V> as Cache>::store_nocache(move _4) -> bb1; // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22 // mir::Constant - // + span: $DIR/dyn-trait.rs:27:5: 27:13 -- // + literal: Const { ty: for<'r> fn(&'r (dyn Cache::V> + 'r)) {mk_cycle::<::V>}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r (dyn Cache::V> + 'r)) {mk_cycle::<::V>}, val: Value() } + // + span: $DIR/dyn-trait.rs:21:7: 21:20 -+ // + literal: Const { ty: for<'r> fn(&'r dyn Cache::V>) {::V> as Cache>::store_nocache}, val: Value(Scalar()) } ++ // + literal: Const { ty: for<'r> fn(&'r dyn Cache::V>) {::V> as Cache>::store_nocache}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir index ade6ccfc7f144..ff338ae58cd87 100644 --- a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir @@ -21,7 +21,7 @@ fn bar() -> bool { _1 = foo; // scope 0 at $DIR/inline-any-operand.rs:11:13: 11:16 // mir::Constant // + span: $DIR/inline-any-operand.rs:11:13: 11:16 - // + literal: Const { ty: fn(i32, i32) -> bool {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32, i32) -> bool {foo}, val: Value() } StorageLive(_2); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 _2 = _1; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 StorageLive(_3); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff index fd9a540ca16e2..34762b97c3b2f 100644 --- a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff +++ b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff @@ -12,7 +12,7 @@ - _1 = no_sanitize() -> bb1; // scope 0 at $DIR/inline-compatibility.rs:24:5: 24:18 - // mir::Constant - // + span: $DIR/inline-compatibility.rs:24:5: 24:16 -- // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value() } - } - - bb1: { diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff index e7db7aa382fae..fd1e1983d1e0d 100644 --- a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff +++ b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff @@ -12,7 +12,7 @@ - _1 = target_feature() -> bb1; // scope 0 at $DIR/inline-compatibility.rs:13:5: 13:21 - // mir::Constant - // + span: $DIR/inline-compatibility.rs:13:5: 13:19 -- // + literal: Const { ty: unsafe fn() {target_feature}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe fn() {target_feature}, val: Value() } - } - - bb1: { diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff index 09bca903c80e8..bced3f6fe56a7 100644 --- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff +++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff @@ -13,7 +13,7 @@ _1 = sum(const 4_u32, const 4_u32, const 30_u32, const 200_u32, const 1000_u32) -> bb1; // scope 0 at $DIR/inline-compatibility.rs:42:13: 42:52 // mir::Constant // + span: $DIR/inline-compatibility.rs:42:13: 42:16 - // + literal: Const { ty: unsafe extern "C" fn(u32, ...) -> u32 {sum}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe extern "C" fn(u32, ...) -> u32 {sum}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff index 5af3946f2e501..a4989cbfa096d 100644 --- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff +++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff @@ -10,7 +10,7 @@ _1 = no_sanitize() -> bb1; // scope 0 at $DIR/inline-compatibility.rs:29:5: 29:18 // mir::Constant // + span: $DIR/inline-compatibility.rs:29:5: 29:16 - // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff index 8c9fa573ce218..49dd90c971cb4 100644 --- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff +++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff @@ -10,7 +10,7 @@ _1 = target_feature() -> bb1; // scope 0 at $DIR/inline-compatibility.rs:18:5: 18:21 // mir::Constant // + span: $DIR/inline-compatibility.rs:18:5: 18:19 - // + literal: Const { ty: unsafe fn() {target_feature}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn() {target_feature}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff index 3b32cb809113e..8128797d27eae 100644 --- a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff @@ -18,7 +18,7 @@ // mir::Constant - // + span: $DIR/inline-cycle.rs:14:5: 14:22 + // + span: $DIR/inline-cycle.rs:36:9: 36:26 - // + literal: Const { ty: fn() {::call}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {::call}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff index c7f8a64afcd8d..29c793d7bd8cd 100644 --- a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff @@ -5,11 +5,11 @@ let mut _0: (); // return place in scope 0 at $DIR/inline-cycle.rs:48:10: 48:10 let _1: (); // in scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 + let mut _2: fn() {f}; // in scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 -+ let mut _5: (); // in scope 0 at $DIR/inline-cycle.rs:54:5: 54:8 + scope 1 (inlined call::) { // at $DIR/inline-cycle.rs:49:5: 49:12 + debug f => _2; // in scope 1 at $DIR/inline-cycle.rs:53:22: 53:23 + let _3: (); // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 + let mut _4: fn() {f}; // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 ++ let mut _5: (); // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 + scope 2 (inlined >::call_once - shim(fn() {f})) { // at $DIR/inline-cycle.rs:54:5: 54:8 + scope 3 (inlined f) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL + let _6: (); // in scope 3 at $DIR/inline-cycle.rs:59:5: 59:12 @@ -25,26 +25,25 @@ // mir::Constant - // + span: $DIR/inline-cycle.rs:49:5: 49:9 + // + span: $DIR/inline-cycle.rs:49:10: 49:11 -+ // + literal: Const { ty: fn() {f}, val: Value(Scalar()) } ++ // + literal: Const { ty: fn() {f}, val: Value() } + StorageLive(_3); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 + StorageLive(_4); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 + _4 = move _2; // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 + StorageLive(_5); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 -+ _5 = const (); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 + StorageLive(_6); // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12 + _6 = call::(f) -> bb1; // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12 + // mir::Constant + // + span: $DIR/inline-cycle.rs:59:5: 59:9 - // + literal: Const { ty: fn(fn() {f}) {call::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(fn() {f}) {call::}, val: Value() } // mir::Constant - // + span: $DIR/inline-cycle.rs:49:10: 49:11 + // + span: $DIR/inline-cycle.rs:59:10: 59:11 - // + literal: Const { ty: fn() {f}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {f}, val: Value() } } bb1: { + StorageDead(_6); // scope 3 at $DIR/inline-cycle.rs:59:12: 59:13 -+ StorageDead(_5); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ StorageDead(_5); // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8 + StorageDead(_4); // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8 + StorageDead(_3); // scope 1 at $DIR/inline-cycle.rs:54:8: 54:9 + StorageDead(_2); // scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 diff --git a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff index 2a19b21510a10..2ccd39e7931ed 100644 --- a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff @@ -20,7 +20,7 @@ // mir::Constant - // + span: $DIR/inline-cycle-generic.rs:9:5: 9:22 + // + span: $DIR/inline-cycle-generic.rs:31:9: 31:26 - // + literal: Const { ty: fn() {::call}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {::call}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff index ff25c5b4bc337..7cdc1a6b546a2 100644 --- a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff @@ -13,7 +13,7 @@ - _2 = sleep(); // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 - // mir::Constant - // + span: $DIR/inline-diverging.rs:8:5: 8:10 -- // + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> ! {sleep}, val: Value() } + goto -> bb1; // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 + } + diff --git a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff index da55260e284ea..595df0aed5ff8 100644 --- a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff @@ -38,9 +38,9 @@ + _7 = begin_panic::<&str>(const "explicit panic"); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL // mir::Constant - // + span: $DIR/inline-diverging.rs:16:9: 16:14 -- // + literal: Const { ty: fn() -> ! {panic}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> ! {panic}, val: Value() } + // + span: $SRC_DIR/std/src/panic.rs:LL:COL -+ // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(Scalar()) } ++ // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value() } + // mir::Constant + // + span: $SRC_DIR/std/src/panic.rs:LL:COL + // + literal: Const { ty: &str, val: Value(Slice(..)) } diff --git a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff index 0a19daa5045c9..32066cf2e3e73 100644 --- a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff @@ -5,20 +5,20 @@ let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:21:12: 21:12 let _1: (!, !); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _2: fn() -> ! {sleep}; // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 -+ let mut _9: (); // in scope 0 at $DIR/inline-diverging.rs:27:13: 27:16 -+ let mut _10: (); // in scope 0 at $DIR/inline-diverging.rs:28:13: 28:16 + scope 1 (inlined call_twice:: ! {sleep}>) { // at $DIR/inline-diverging.rs:22:5: 22:22 + debug f => _2; // in scope 1 at $DIR/inline-diverging.rs:26:36: 26:37 + let _3: !; // in scope 1 at $DIR/inline-diverging.rs:27:9: 27:10 + let mut _4: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 -+ let mut _6: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:14 -+ let mut _7: !; // in scope 1 at $DIR/inline-diverging.rs:29:6: 29:7 -+ let mut _8: !; // in scope 1 at $DIR/inline-diverging.rs:29:9: 29:10 ++ let mut _5: (); // in scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 ++ let mut _7: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:14 ++ let mut _8: (); // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:16 ++ let mut _9: !; // in scope 1 at $DIR/inline-diverging.rs:29:6: 29:7 ++ let mut _10: !; // in scope 1 at $DIR/inline-diverging.rs:29:9: 29:10 + scope 2 { + debug a => _3; // in scope 2 at $DIR/inline-diverging.rs:27:9: 27:10 -+ let _5: !; // in scope 2 at $DIR/inline-diverging.rs:28:9: 28:10 ++ let _6: !; // in scope 2 at $DIR/inline-diverging.rs:28:9: 28:10 + scope 3 { -+ debug b => _5; // in scope 3 at $DIR/inline-diverging.rs:28:9: 28:10 ++ debug b => _6; // in scope 3 at $DIR/inline-diverging.rs:28:9: 28:10 + } + scope 6 (inlined ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:28:13: 28:16 + scope 7 (inlined sleep) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL @@ -38,15 +38,14 @@ + _2 = sleep; // scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 // mir::Constant - // + span: $DIR/inline-diverging.rs:22:5: 22:15 -- // + literal: Const { ty: fn(fn() -> ! {sleep}) -> (!, !) {call_twice:: ! {sleep}>}, val: Value(Scalar()) } +- // + literal: Const { ty: fn(fn() -> ! {sleep}) -> (!, !) {call_twice:: ! {sleep}>}, val: Value() } - // mir::Constant // + span: $DIR/inline-diverging.rs:22:16: 22:21 - // + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> ! {sleep}, val: Value() } + StorageLive(_3); // scope 1 at $DIR/inline-diverging.rs:27:9: 27:10 + StorageLive(_4); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 + _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 -+ StorageLive(_9); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 -+ _9 = const (); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 ++ StorageLive(_5); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 + goto -> bb1; // scope 5 at $DIR/inline-diverging.rs:39:5: 39:12 + } + diff --git a/src/test/mir-opt/inline/inline_generator.main.Inline.diff b/src/test/mir-opt/inline/inline_generator.main.Inline.diff index 51994323c457f..bb093c5bc0936 100644 --- a/src/test/mir-opt/inline/inline_generator.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_generator.main.Inline.diff @@ -43,7 +43,7 @@ - _4 = g() -> bb1; // scope 0 at $DIR/inline-generator.rs:9:28: 9:31 - // mir::Constant - // + span: $DIR/inline-generator.rs:9:28: 9:29 -- // + literal: Const { ty: fn() -> impl Generator {g}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> impl Generator {g}, val: Value() } - } - - bb1: { @@ -54,7 +54,7 @@ - // mir::Constant - // + span: $DIR/inline-generator.rs:9:14: 9:22 - // + user_ty: UserType(0) -- // + literal: Const { ty: fn(&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]) -> Pin<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]> {Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new}, val: Value(Scalar()) } +- // + literal: Const { ty: fn(&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]) -> Pin<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]> {Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new}, val: Value() } - } - - bb2: { @@ -70,7 +70,7 @@ - _1 = <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 - // mir::Constant - // + span: $DIR/inline-generator.rs:9:33: 9:39 -- // + literal: Const { ty: for<'r> fn(Pin<&'r mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::resume}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(Pin<&'r mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator>::resume}, val: Value() } + StorageLive(_7); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + _7 = const false; // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_10); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 diff --git a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff index 65891cbb660e1..05bd99b62cd1f 100644 --- a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff +++ b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff @@ -14,7 +14,7 @@ _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline-instruction-set.rs:51:5: 51:26 // mir::Constant // + span: $DIR/inline-instruction-set.rs:51:5: 51:24 - // + literal: Const { ty: fn() {instruction_set_a32}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {instruction_set_a32}, val: Value() } } bb1: { @@ -23,7 +23,7 @@ _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:52:5: 52:26 // mir::Constant // + span: $DIR/inline-instruction-set.rs:52:5: 52:24 - // + literal: Const { ty: fn() {instruction_set_t32}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {instruction_set_t32}, val: Value() } } bb2: { @@ -32,7 +32,7 @@ - _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline-instruction-set.rs:53:5: 53:30 - // mir::Constant - // + span: $DIR/inline-instruction-set.rs:53:5: 53:28 -- // + literal: Const { ty: fn() {instruction_set_default}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() {instruction_set_default}, val: Value() } - } - - bb3: { diff --git a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff index 20e1d0ae4d5da..cb0d01428c946 100644 --- a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff +++ b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff @@ -14,7 +14,7 @@ _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline-instruction-set.rs:42:5: 42:26 // mir::Constant // + span: $DIR/inline-instruction-set.rs:42:5: 42:24 - // + literal: Const { ty: fn() {instruction_set_a32}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {instruction_set_a32}, val: Value() } } bb1: { @@ -23,7 +23,7 @@ - _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:43:5: 43:26 - // mir::Constant - // + span: $DIR/inline-instruction-set.rs:43:5: 43:24 -- // + literal: Const { ty: fn() {instruction_set_t32}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() {instruction_set_t32}, val: Value() } - } - - bb2: { @@ -33,7 +33,7 @@ + _3 = instruction_set_default() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:46:5: 46:30 // mir::Constant // + span: $DIR/inline-instruction-set.rs:46:5: 46:28 - // + literal: Const { ty: fn() {instruction_set_default}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {instruction_set_default}, val: Value() } } - bb3: { diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff index 89414574898a6..17050f184cb48 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff @@ -28,7 +28,7 @@ _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/inline-into-box-place.rs:8:29: 8:43 // mir::Constant // + span: $DIR/inline-into-box-place.rs:8:29: 8:43 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -44,7 +44,7 @@ // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:33: 8:41 - // + user_ty: UserType(1) -- // + literal: Const { ty: fn() -> Vec {Vec::::new}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> Vec {Vec::::new}, val: Value() } - } - - bb2: { @@ -75,7 +75,7 @@ - _6 = alloc::alloc::box_free::, std::alloc::Global>(move (_5.0: std::ptr::Unique>), move (_5.1: std::alloc::Global)) -> bb5; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 -- // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value() } - } - - bb5 (cleanup): { diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff index 89414574898a6..17050f184cb48 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff @@ -28,7 +28,7 @@ _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/inline-into-box-place.rs:8:29: 8:43 // mir::Constant // + span: $DIR/inline-into-box-place.rs:8:29: 8:43 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -44,7 +44,7 @@ // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:33: 8:41 - // + user_ty: UserType(1) -- // + literal: Const { ty: fn() -> Vec {Vec::::new}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> Vec {Vec::::new}, val: Value() } - } - - bb2: { @@ -75,7 +75,7 @@ - _6 = alloc::alloc::box_free::, std::alloc::Global>(move (_5.0: std::ptr::Unique>), move (_5.1: std::alloc::Global)) -> bb5; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 -- // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe fn(Unique>, std::alloc::Global) {alloc::alloc::box_free::, std::alloc::Global>}, val: Value() } - } - - bb5 (cleanup): { diff --git a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir index eca76df576bf6..45023083be668 100644 --- a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir @@ -15,7 +15,7 @@ fn main() -> () { _1 = not_inlined() -> bb1; // scope 0 at $DIR/inline-options.rs:9:5: 9:18 // mir::Constant // + span: $DIR/inline-options.rs:9:5: 9:16 - // + literal: Const { ty: fn() {not_inlined}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {not_inlined}, val: Value() } } bb1: { @@ -25,7 +25,7 @@ fn main() -> () { _3 = g() -> bb2; // scope 1 at $DIR/inline-options.rs:16:23: 16:26 // mir::Constant // + span: $DIR/inline-options.rs:16:23: 16:24 - // + literal: Const { ty: fn() {g}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {g}, val: Value() } } bb2: { @@ -34,7 +34,7 @@ fn main() -> () { _4 = g() -> bb3; // scope 1 at $DIR/inline-options.rs:16:28: 16:31 // mir::Constant // + span: $DIR/inline-options.rs:16:28: 16:29 - // + literal: Const { ty: fn() {g}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {g}, val: Value() } } bb3: { @@ -43,7 +43,7 @@ fn main() -> () { _5 = g() -> bb4; // scope 1 at $DIR/inline-options.rs:16:33: 16:36 // mir::Constant // + span: $DIR/inline-options.rs:16:33: 16:34 - // + literal: Const { ty: fn() {g}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {g}, val: Value() } } bb4: { diff --git a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir index 2d85ff9a0cbc2..fcc1767578eb2 100644 --- a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir @@ -27,7 +27,7 @@ fn bar() -> bool { _1 = foo; // scope 0 at $DIR/inline-retag.rs:11:13: 11:16 // mir::Constant // + span: $DIR/inline-retag.rs:11:13: 11:16 - // + literal: Const { ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}, val: Value() } StorageLive(_2); // scope 1 at $DIR/inline-retag.rs:12:5: 12:6 _2 = _1; // scope 1 at $DIR/inline-retag.rs:12:5: 12:6 StorageLive(_3); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 diff --git a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff index 7170cd4057200..d67b07b0181b4 100644 --- a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff +++ b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff @@ -14,7 +14,7 @@ - _0 = ::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 - // mir::Constant - // + span: $DIR/inline-shims.rs:6:7: 6:12 -- // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {::clone}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {::clone}, val: Value() } - } - - bb1: { diff --git a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff index aa55c90fcfb55..5c7cbc9b41900 100644 --- a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff +++ b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff @@ -24,7 +24,7 @@ _3 = std::ptr::drop_in_place::>(move _4) -> bb1; // scope 1 at $DIR/inline-shims.rs:11:14: 11:40 // mir::Constant // + span: $DIR/inline-shims.rs:11:14: 11:37 - // + literal: Const { ty: unsafe fn(*mut Vec) {std::ptr::drop_in_place::>}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(*mut Vec) {std::ptr::drop_in_place::>}, val: Value() } } bb1: { @@ -35,7 +35,7 @@ - _0 = std::ptr::drop_in_place::>(move _5) -> bb2; // scope 2 at $DIR/inline-shims.rs:12:14: 12:40 - // mir::Constant - // + span: $DIR/inline-shims.rs:12:14: 12:37 -- // + literal: Const { ty: unsafe fn(*mut Option) {std::ptr::drop_in_place::>}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe fn(*mut Option) {std::ptr::drop_in_place::>}, val: Value() } + StorageLive(_6); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40 + StorageLive(_7); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40 + _6 = discriminant((*_5)); // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL diff --git a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff index 8e93baf6a7050..747eeb9845073 100644 --- a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff @@ -15,7 +15,7 @@ - _1 = as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38 - // mir::Constant - // + span: $DIR/inline-specialization.rs:5:13: 5:36 -- // + literal: Const { ty: fn() -> u32 { as Foo>::bar}, val: Value(Scalar()) } +- // + literal: Const { ty: fn() -> u32 { as Foo>::bar}, val: Value() } - } - - bb1: { diff --git a/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir index 0be979901ac03..1646de9289a81 100644 --- a/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir @@ -11,7 +11,7 @@ fn test(_1: &dyn X) -> u32 { _0 = ::y(move _2) -> bb1; // scope 0 at $DIR/inline-trait-method.rs:9:5: 9:10 // mir::Constant // + span: $DIR/inline-trait-method.rs:9:7: 9:8 - // + literal: Const { ty: for<'r> fn(&'r dyn X) -> u32 {::y}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r dyn X) -> u32 {::y}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir index 64375b6edc93e..eb6c09c1cd798 100644 --- a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir @@ -21,7 +21,7 @@ fn test2(_1: &dyn X) -> bool { _0 = ::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 // mir::Constant // + span: $DIR/inline-trait-method_2.rs:10:7: 10:8 - // + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {::y}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {::y}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff index b44f9900d6c6a..f91d352622626 100644 --- a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff +++ b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff @@ -19,7 +19,7 @@ + _4 = hide_foo() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15 // mir::Constant // + span: $DIR/issue-78442.rs:11:5: 11:13 - // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value() } } bb1: { @@ -29,7 +29,7 @@ - _2 = >::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17 - // mir::Constant - // + span: $DIR/issue-78442.rs:11:5: 11:15 -- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> >::Output {>::call}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> >::Output {>::call}, val: Value() } + _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL } diff --git a/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff b/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff index 8a998fb50006c..4446280e72004 100644 --- a/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff +++ b/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff @@ -18,7 +18,7 @@ _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15 // mir::Constant // + span: $DIR/issue-78442.rs:11:5: 11:13 - // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value() } } bb1: { @@ -29,8 +29,8 @@ + _2 = >::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17 // mir::Constant // + span: $DIR/issue-78442.rs:11:5: 11:15 -- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> >::Output {>::call}, val: Value(Scalar()) } -+ // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> >::Output {>::call}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> >::Output {>::call}, val: Value() } ++ // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> >::Output {>::call}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff index 34ba7dfdcc5bb..9384ce52cc825 100644 --- a/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff +++ b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff @@ -22,7 +22,7 @@ _2 = bar() -> [return: bb3, unwind: bb6]; // scope 0 at /the/src/instrument_coverage.rs:12:12: 12:17 // mir::Constant // + span: /the/src/instrument_coverage.rs:12:12: 12:15 - // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {bar}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir index 7113c42b9c77f..19110894dc720 100644 --- a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir @@ -23,7 +23,7 @@ fn main() -> () { _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-41110.rs:8:21: 8:27 // mir::Constant // + span: $DIR/issue-41110.rs:8:23: 8:25 - // + literal: Const { ty: fn(S) -> S {S::id}, val: Value(Scalar()) } + // + literal: Const { ty: fn(S) -> S {S::id}, val: Value() } } bb1: { @@ -32,7 +32,7 @@ fn main() -> () { _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28 // mir::Constant // + span: $DIR/issue-41110.rs:8:15: 8:20 - // + literal: Const { ty: fn(S, S) {S::other}, val: Value(Scalar()) } + // + literal: Const { ty: fn(S, S) {S::other}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir index c4e852ca3212a..1901ea1747ed2 100644 --- a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir @@ -28,7 +28,7 @@ fn test() -> () { _3 = std::mem::drop::(move _4) -> [return: bb1, unwind: bb7]; // scope 2 at $DIR/issue-41110.rs:17:5: 17:12 // mir::Constant // + span: $DIR/issue-41110.rs:17:5: 17:9 - // + literal: Const { ty: fn(S) {std::mem::drop::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(S) {std::mem::drop::}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir index ce7ca20358e12..a4ff718f42258 100644 --- a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir @@ -29,7 +29,7 @@ fn main() -> () { _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue-41888.rs:8:8: 8:14 // mir::Constant // + span: $DIR/issue-41888.rs:8:8: 8:12 - // + literal: Const { ty: fn() -> bool {cond}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {cond}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/issue_49232.main.mir_map.0.mir b/src/test/mir-opt/issue_49232.main.mir_map.0.mir index 2f8931382a69e..6301763449b90 100644 --- a/src/test/mir-opt/issue_49232.main.mir_map.0.mir +++ b/src/test/mir-opt/issue_49232.main.mir_map.0.mir @@ -59,7 +59,7 @@ fn main() -> () { _5 = std::mem::drop::<&i32>(move _6) -> [return: bb9, unwind: bb11]; // scope 1 at $DIR/issue-49232.rs:13:9: 13:22 // mir::Constant // + span: $DIR/issue-49232.rs:13:9: 13:13 - // + literal: Const { ty: fn(&i32) {std::mem::drop::<&i32>}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&i32) {std::mem::drop::<&i32>}, val: Value() } } bb9: { diff --git a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir index 4d06b91e6dc61..f21e9bbd270a2 100644 --- a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir +++ b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir @@ -34,7 +34,7 @@ fn test() -> Option> { _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/issue-62289.rs:9:10: 9:21 // mir::Constant // + span: $DIR/issue-62289.rs:9:10: 9:21 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -46,7 +46,7 @@ fn test() -> Option> { _6 = as Try>::branch(move _7) -> [return: bb2, unwind: bb12]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 // mir::Constant // + span: $DIR/issue-62289.rs:9:15: 9:20 - // + literal: Const { ty: fn(Option) -> ControlFlow< as Try>::Residual, as Try>::Output> { as Try>::branch}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Option) -> ControlFlow< as Try>::Residual, as Try>::Output> { as Try>::branch}, val: Value() } } bb2: { @@ -76,7 +76,7 @@ fn test() -> Option> { _0 = > as FromResidual>>::from_residual(move _11) -> [return: bb6, unwind: bb12]; // scope 3 at $DIR/issue-62289.rs:9:15: 9:20 // mir::Constant // + span: $DIR/issue-62289.rs:9:19: 9:20 - // + literal: Const { ty: fn(Option) -> Option> {> as FromResidual>>::from_residual}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Option) -> Option> {> as FromResidual>>::from_residual}, val: Value() } } bb6: { diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.32bit.mir b/src/test/mir-opt/issue_72181.main.mir_map.0.32bit.mir index 2e6783b7f3c9d..f4602d147c947 100644 --- a/src/test/mir-opt/issue_72181.main.mir_map.0.32bit.mir +++ b/src/test/mir-opt/issue_72181.main.mir_map.0.32bit.mir @@ -25,7 +25,7 @@ fn main() -> () { _1 = std::mem::size_of::() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-72181.rs:24:13: 24:34 // mir::Constant // + span: $DIR/issue-72181.rs:24:13: 24:32 - // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.64bit.mir b/src/test/mir-opt/issue_72181.main.mir_map.0.64bit.mir index 2e6783b7f3c9d..f4602d147c947 100644 --- a/src/test/mir-opt/issue_72181.main.mir_map.0.64bit.mir +++ b/src/test/mir-opt/issue_72181.main.mir_map.0.64bit.mir @@ -25,7 +25,7 @@ fn main() -> () { _1 = std::mem::size_of::() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-72181.rs:24:13: 24:34 // mir::Constant // + span: $DIR/issue-72181.rs:24:13: 24:32 - // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir index 899c84687890b..9842e26ab6993 100644 --- a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir +++ b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir @@ -24,7 +24,7 @@ fn main() -> () { _2 = transmute::<(), Void>(move _3) -> bb4; // scope 2 at $DIR/issue-72181-1.rs:17:9: 17:44 // mir::Constant // + span: $DIR/issue-72181-1.rs:17:9: 17:40 - // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(()) -> Void {transmute::<(), Void>}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(()) -> Void {transmute::<(), Void>}, val: Value() } } bb1: { @@ -37,7 +37,7 @@ fn main() -> () { _4 = f(move _5) -> bb4; // scope 1 at $DIR/issue-72181-1.rs:20:5: 20:9 // mir::Constant // + span: $DIR/issue-72181-1.rs:20:5: 20:6 - // + literal: Const { ty: fn(Void) -> ! {f}, val: Value(Scalar()) } + // + literal: Const { ty: fn(Void) -> ! {f}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff index 8b0a73ec4ba61..9295265154424 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff @@ -98,7 +98,7 @@ _14 = core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff index 8b0a73ec4ba61..9295265154424 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff @@ -98,7 +98,7 @@ _14 = core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff index c96a6641bab91..f52b1a953c120 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff @@ -135,7 +135,7 @@ _21 = core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff index c96a6641bab91..f52b1a953c120 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff @@ -135,7 +135,7 @@ _21 = core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option>) -> ! {core::panicking::assert_failed::}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } diff --git a/src/test/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff b/src/test/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff index 29bcef26518a1..14bb66910fe3c 100644 --- a/src/test/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff +++ b/src/test/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff @@ -70,7 +70,7 @@ _22 = core::panicking::panic(const "internal error: entered unreachable code"); // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/panic.rs:LL:COL - // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/panic.rs:LL:COL // + literal: Const { ty: &str, val: Value(Slice(..)) } diff --git a/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir b/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir index 40e7b74453a7c..dd85434d879c3 100644 --- a/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir +++ b/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir @@ -39,7 +39,7 @@ fn num_to_digit(_1: char) -> u32 { _7 = char::methods::::to_digit(move _8, const 8_u32) -> bb5; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/char/methods.rs:LL:COL - // + literal: Const { ty: fn(char, u32) -> Option {char::methods::::to_digit}, val: Value(Scalar()) } + // + literal: Const { ty: fn(char, u32) -> Option {char::methods::::to_digit}, val: Value() } } bb1: { @@ -50,7 +50,7 @@ fn num_to_digit(_1: char) -> u32 { _3 = char::methods::::to_digit(move _4, const 8_u32) -> bb2; // scope 0 at $DIR/issue-59352.rs:14:26: 14:41 // mir::Constant // + span: $DIR/issue-59352.rs:14:30: 14:38 - // + literal: Const { ty: fn(char, u32) -> Option {char::methods::::to_digit}, val: Value(Scalar()) } + // + literal: Const { ty: fn(char, u32) -> Option {char::methods::::to_digit}, val: Value() } } bb2: { @@ -90,7 +90,7 @@ fn num_to_digit(_1: char) -> u32 { _11 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value"); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/option.rs:LL:COL - // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value() } // mir::Constant // + span: $SRC_DIR/core/src/option.rs:LL:COL // + literal: Const { ty: &str, val: Value(Slice(..)) } diff --git a/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff b/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff index b8023a6a8e690..08ff3b67655ce 100644 --- a/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff +++ b/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff @@ -27,7 +27,7 @@ _2 = transmute::<[u8; 16], [u32; 4]>(move _3) -> bb1; // scope 2 at $DIR/issue-75439.rs:7:37: 7:53 // mir::Constant // + span: $DIR/issue-75439.rs:7:37: 7:46 - // + literal: Const { ty: unsafe extern "rust-intrinsic" fn([u8; 16]) -> [u32; 4] {transmute::<[u8; 16], [u32; 4]>}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn([u8; 16]) -> [u32; 4] {transmute::<[u8; 16], [u32; 4]>}, val: Value() } } bb1: { @@ -50,7 +50,7 @@ _5 = transmute::(move _6) -> bb7; // scope 4 at $DIR/issue-75439.rs:10:23: 10:36 // mir::Constant // + span: $DIR/issue-75439.rs:10:23: 10:32 - // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32) -> [u8; 4] {transmute::}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32) -> [u8; 4] {transmute::}, val: Value() } } bb5: { diff --git a/src/test/mir-opt/lower_intrinsics.align_of.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.align_of.LowerIntrinsics.diff index 3f5f71f80825d..1b9e46c6a6d0a 100644 --- a/src/test/mir-opt/lower_intrinsics.align_of.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.align_of.LowerIntrinsics.diff @@ -8,7 +8,7 @@ - _0 = std::intrinsics::min_align_of::() -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:19:5: 19:42 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:19:5: 19:40 -- // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::min_align_of::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::min_align_of::}, val: Value() } + _0 = AlignOf(T); // scope 0 at $DIR/lower_intrinsics.rs:19:5: 19:42 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:19:5: 19:42 } diff --git a/src/test/mir-opt/lower_intrinsics.discriminant.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.discriminant.LowerIntrinsics.diff index 88d2867fc42ab..9bda88ce2c7e8 100644 --- a/src/test/mir-opt/lower_intrinsics.discriminant.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.discriminant.LowerIntrinsics.diff @@ -32,7 +32,7 @@ - _2 = discriminant_value::(move _3) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:74:5: 74:45 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:74:5: 74:41 -- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r T) -> ::Discriminant {discriminant_value::}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r T) -> ::Discriminant {discriminant_value::}, val: Value() } + _2 = discriminant((*_3)); // scope 0 at $DIR/lower_intrinsics.rs:74:5: 74:45 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:74:5: 74:45 } @@ -53,7 +53,7 @@ - _5 = discriminant_value::(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:75:5: 75:45 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:75:5: 75:41 -- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r i32) -> ::Discriminant {discriminant_value::}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r i32) -> ::Discriminant {discriminant_value::}, val: Value() } + _5 = discriminant((*_6)); // scope 0 at $DIR/lower_intrinsics.rs:75:5: 75:45 + goto -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:75:5: 75:45 } @@ -74,7 +74,7 @@ - _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:76:5: 76:46 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:76:5: 76:41 -- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value() } + _9 = discriminant((*_10)); // scope 0 at $DIR/lower_intrinsics.rs:76:5: 76:46 + goto -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:76:5: 76:46 } @@ -95,7 +95,7 @@ - _13 = discriminant_value::(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:77:5: 77:48 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:77:5: 77:41 -- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r E) -> ::Discriminant {discriminant_value::}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r E) -> ::Discriminant {discriminant_value::}, val: Value() } + _13 = discriminant((*_14)); // scope 0 at $DIR/lower_intrinsics.rs:77:5: 77:48 + goto -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:77:5: 77:48 } diff --git a/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir b/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir index 7750624db30fb..a12aa1d6686a9 100644 --- a/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir +++ b/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir @@ -20,7 +20,7 @@ fn f_u64() -> () { _2 = f_non_zst::(move _3) -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:48:9: 48:21 // mir::Constant // + span: $DIR/lower_intrinsics.rs:48:9: 48:18 - // + literal: Const { ty: fn(u64) {f_non_zst::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(u64) {f_non_zst::}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir b/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir index 4d4e65d311416..49e3b9144a59a 100644 --- a/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir +++ b/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir @@ -6,6 +6,7 @@ fn f_unit() -> () { scope 1 (inlined f_dispatch::<()>) { // at $DIR/lower_intrinsics.rs:34:5: 34:19 debug t => _1; // in scope 1 at $DIR/lower_intrinsics.rs:44:22: 44:23 let _2: (); // in scope 1 at $DIR/lower_intrinsics.rs:46:9: 46:17 + let mut _3: (); // in scope 1 at $DIR/lower_intrinsics.rs:46:15: 46:16 scope 2 (inlined std::mem::size_of::<()>) { // at $DIR/lower_intrinsics.rs:45:8: 45:32 } } @@ -13,13 +14,15 @@ fn f_unit() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/lower_intrinsics.rs:34:16: 34:18 StorageLive(_2); // scope 1 at $DIR/lower_intrinsics.rs:46:9: 46:17 - _2 = f_zst::<()>(const ()) -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:46:9: 46:17 + StorageLive(_3); // scope 1 at $DIR/lower_intrinsics.rs:46:15: 46:16 + _2 = f_zst::<()>(move _3) -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:46:9: 46:17 // mir::Constant // + span: $DIR/lower_intrinsics.rs:46:9: 46:14 - // + literal: Const { ty: fn(()) {f_zst::<()>}, val: Value(Scalar()) } + // + literal: Const { ty: fn(()) {f_zst::<()>}, val: Value() } } bb1: { + StorageDead(_3); // scope 1 at $DIR/lower_intrinsics.rs:46:16: 46:17 StorageDead(_2); // scope 1 at $DIR/lower_intrinsics.rs:46:17: 46:18 StorageDead(_1); // scope 0 at $DIR/lower_intrinsics.rs:34:18: 34:19 return; // scope 0 at $DIR/lower_intrinsics.rs:35:2: 35:2 diff --git a/src/test/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff index 7e1e066366c11..6c99e1b7ca6cb 100644 --- a/src/test/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff @@ -12,7 +12,7 @@ - _0 = std::intrinsics::forget::(move _2) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:24:5: 24:29 -- // + literal: Const { ty: extern "rust-intrinsic" fn(T) {std::intrinsics::forget::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn(T) {std::intrinsics::forget::}, val: Value() } + _0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32 } diff --git a/src/test/mir-opt/lower_intrinsics.non_const.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.non_const.LowerIntrinsics.diff index 276227d8c018a..41dac17dcb640 100644 --- a/src/test/mir-opt/lower_intrinsics.non_const.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.non_const.LowerIntrinsics.diff @@ -14,7 +14,7 @@ _1 = std::intrinsics::size_of::; // scope 0 at $DIR/lower_intrinsics.rs:62:21: 62:51 // mir::Constant // + span: $DIR/lower_intrinsics.rs:62:21: 62:51 - // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::}, val: Value(Scalar()) } + // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::}, val: Value() } StorageLive(_2); // scope 1 at $DIR/lower_intrinsics.rs:63:5: 63:14 _2 = _1; // scope 1 at $DIR/lower_intrinsics.rs:63:5: 63:14 - _0 = move _2() -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:63:5: 63:16 diff --git a/src/test/mir-opt/lower_intrinsics.size_of.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.size_of.LowerIntrinsics.diff index b5a77702a8ef0..cd6da6f1dc745 100644 --- a/src/test/mir-opt/lower_intrinsics.size_of.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.size_of.LowerIntrinsics.diff @@ -8,7 +8,7 @@ - _0 = std::intrinsics::size_of::() -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:14:5: 14:37 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:14:5: 14:35 -- // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::}, val: Value() } + _0 = SizeOf(T); // scope 0 at $DIR/lower_intrinsics.rs:14:5: 14:37 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:14:5: 14:37 } diff --git a/src/test/mir-opt/lower_intrinsics.unreachable.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.unreachable.LowerIntrinsics.diff index eb463afbf7795..0ce8d85070c70 100644 --- a/src/test/mir-opt/lower_intrinsics.unreachable.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.unreachable.LowerIntrinsics.diff @@ -15,7 +15,7 @@ - _3 = std::intrinsics::unreachable(); // scope 1 at $DIR/lower_intrinsics.rs:29:14: 29:45 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:29:14: 29:43 -- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn() -> ! {std::intrinsics::unreachable}, val: Value(Scalar()) } +- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn() -> ! {std::intrinsics::unreachable}, val: Value() } + unreachable; // scope 1 at $DIR/lower_intrinsics.rs:29:14: 29:45 } diff --git a/src/test/mir-opt/lower_intrinsics.wrapping.LowerIntrinsics.diff b/src/test/mir-opt/lower_intrinsics.wrapping.LowerIntrinsics.diff index 5a0286bad2fb7..ebe240121cc5f 100644 --- a/src/test/mir-opt/lower_intrinsics.wrapping.LowerIntrinsics.diff +++ b/src/test/mir-opt/lower_intrinsics.wrapping.LowerIntrinsics.diff @@ -33,7 +33,7 @@ - _3 = wrapping_add::(move _4, move _5) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:7:14: 7:44 -- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_add::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_add::}, val: Value() } + _3 = Add(move _4, move _5); // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 } @@ -49,7 +49,7 @@ - _6 = wrapping_sub::(move _7, move _8) -> bb2; // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:8:14: 8:44 -- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_sub::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_sub::}, val: Value() } + _6 = Sub(move _7, move _8); // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 + goto -> bb2; // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 } @@ -65,7 +65,7 @@ - _9 = wrapping_mul::(move _10, move _11) -> bb3; // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 - // mir::Constant - // + span: $DIR/lower_intrinsics.rs:9:14: 9:44 -- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_mul::}, val: Value(Scalar()) } +- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> i32 {wrapping_mul::}, val: Value() } + _9 = Mul(move _10, move _11); // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 + goto -> bb3; // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 } diff --git a/src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff b/src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff index 13241d882f210..96404f0506cf2 100644 --- a/src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff +++ b/src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff @@ -23,7 +23,7 @@ - _5 = core::slice::::len(move _6) -> bb1; // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 - // mir::Constant - // + span: $DIR/lower_slice_len.rs:5:22: 5:25 -- // + literal: Const { ty: for<'r> fn(&'r [u8]) -> usize {core::slice::::len}, val: Value(Scalar()) } +- // + literal: Const { ty: for<'r> fn(&'r [u8]) -> usize {core::slice::::len}, val: Value() } + _5 = Len((*_6)); // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 + goto -> bb1; // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 } diff --git a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir index 0d0204e126a6c..722097630f79b 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir @@ -61,7 +61,7 @@ fn full_tested_match() -> () { _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:14:20: 14:27 // mir::Constant // + span: $DIR/match_false_edges.rs:14:20: 14:25 - // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {guard}, val: Value() } } bb6: { diff --git a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir index 270cc85ce032a..df052e32157db 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir @@ -62,7 +62,7 @@ fn full_tested_match2() -> () { _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:25:20: 25:27 // mir::Constant // + span: $DIR/match_false_edges.rs:25:20: 25:25 - // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {guard}, val: Value() } } bb6: { diff --git a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir index 2f76e0137bd69..fc50db397fdcf 100644 --- a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir @@ -70,7 +70,7 @@ fn main() -> () { _8 = guard() -> [return: bb6, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:34:21: 34:28 // mir::Constant // + span: $DIR/match_false_edges.rs:34:21: 34:26 - // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {guard}, val: Value() } } bb6: { @@ -113,7 +113,7 @@ fn main() -> () { _12 = guard2(move _13) -> [return: bb11, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:36:20: 36:29 // mir::Constant // + span: $DIR/match_false_edges.rs:36:20: 36:26 - // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(Scalar()) } + // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value() } } bb11: { diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir index 7d9e012bb296e..e1d870ef9a4e9 100644 --- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir +++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir @@ -70,30 +70,30 @@ fn main() -> () { StorageLive(_8); // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 StorageLive(_9); // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 _9 = (*_6); // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 - _8 = ConstValue(Scalar(): fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 + _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 // mir::Constant // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14 - // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value() } } bb3: { StorageDead(_9); // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18 StorageDead(_8); // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19 - _0 = const ConstValue(Scalar(): ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6 + _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6 goto -> bb6; // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } bb4: { StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 - _10 = ConstValue(Scalar(): fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 + _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 // mir::Constant // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14 - // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value() } } bb5: { StorageDead(_10); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19 - _0 = const ConstValue(Scalar(): ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6 + _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6 goto -> bb6; // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir index c555e0441f423..2f9dff00b631b 100644 --- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir +++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir @@ -70,30 +70,30 @@ fn main() -> () { StorageLive(_8); // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 StorageLive(_9); // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 _9 = (*_6); // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 - _8 = ConstValue(Scalar(): fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 + _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 // mir::Constant // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14 - // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value() } } bb3: { StorageDead(_9); // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18 StorageDead(_8); // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19 - _0 = const ConstValue(Scalar(): ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6 + _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6 goto -> bb6; // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } bb4: { StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 - _10 = ConstValue(Scalar(): fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x0000000000000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 + _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x0000000000000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 // mir::Constant // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14 - // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value() } } bb5: { StorageDead(_10); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19 - _0 = const ConstValue(Scalar(): ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6 + _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6 goto -> bb6; // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } diff --git a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir index 8a297cea2b956..fda6cd6120771 100644 --- a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir @@ -23,7 +23,7 @@ fn unwrap(_1: Option) -> T { _4 = begin_panic::<&str>(const "explicit panic") -> bb4; // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/panic.rs:LL:COL - // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(Scalar()) } + // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value() } // mir::Constant // + span: $SRC_DIR/std/src/panic.rs:LL:COL // + literal: Const { ty: &str, val: Value(Slice(..)) } diff --git a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir index bdab2d9322210..0c814fd9d8dda 100644 --- a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir @@ -20,7 +20,7 @@ fn main() -> () { _2 = ::to_string(move _3) -> bb1; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:9:23: 9:32 - // + literal: Const { ty: for<'r> fn(&'r str) -> String {::to_string}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r str) -> String {::to_string}, val: Value() } } bb1: { @@ -28,7 +28,7 @@ fn main() -> () { _1 = std::mem::drop::(move _2) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:9:5: 9:19 - // + literal: Const { ty: fn(String) {std::mem::drop::}, val: Value(Scalar()) } + // + literal: Const { ty: fn(String) {std::mem::drop::}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir b/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir index 5bf8655fcecdc..8ee81e679ec47 100644 --- a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir +++ b/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir @@ -32,7 +32,7 @@ fn main() -> () { _1 = null_mut::() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/receiver-ptr-mutability.rs:14:26: 14:46 // mir::Constant // + span: $DIR/receiver-ptr-mutability.rs:14:26: 14:44 - // + literal: Const { ty: fn() -> *mut Test {null_mut::}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> *mut Test {null_mut::}, val: Value() } } bb1: { @@ -47,7 +47,7 @@ fn main() -> () { _2 = Test::x(move _3) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/receiver-ptr-mutability.rs:15:5: 15:12 // mir::Constant // + span: $DIR/receiver-ptr-mutability.rs:15:9: 15:10 - // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value() } } bb2: { @@ -75,7 +75,7 @@ fn main() -> () { _10 = Test::x(move _11) -> [return: bb3, unwind: bb4]; // scope 2 at $DIR/receiver-ptr-mutability.rs:19:5: 19:16 // mir::Constant // + span: $DIR/receiver-ptr-mutability.rs:19:13: 19:14 - // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(Scalar()) } + // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff b/src/test/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff index 447fe654c0cca..b2bfe4280b0af 100644 --- a/src/test/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff +++ b/src/test/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff @@ -60,7 +60,7 @@ _7 = as iter::range::RangeIteratorImpl>::spec_next(move _14) -> bb4; // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/iter/range.rs:LL:COL - // + literal: Const { ty: for<'r> fn(&'r mut std::ops::Range) -> Option< as iter::range::RangeIteratorImpl>::Item> { as iter::range::RangeIteratorImpl>::spec_next}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r mut std::ops::Range) -> Option< as iter::range::RangeIteratorImpl>::Item> { as iter::range::RangeIteratorImpl>::spec_next}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir index c8c45da19137f..05e83b13a50c4 100644 --- a/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir @@ -81,7 +81,7 @@ fn array_casts() -> () { _6 = ptr::mut_ptr::::add(move _7, const 1_usize) -> bb1; // scope 3 at $DIR/retag.rs:60:15: 60:23 // mir::Constant // + span: $DIR/retag.rs:60:17: 60:20 - // + literal: Const { ty: unsafe fn(*mut usize, usize) -> *mut usize {ptr::mut_ptr::::add}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(*mut usize, usize) -> *mut usize {ptr::mut_ptr::::add}, val: Value() } } bb1: { @@ -112,7 +112,7 @@ fn array_casts() -> () { _16 = ptr::const_ptr::::add(move _17, const 1_usize) -> bb2; // scope 6 at $DIR/retag.rs:64:26: 64:34 // mir::Constant // + span: $DIR/retag.rs:64:28: 64:31 - // + literal: Const { ty: unsafe fn(*const usize, usize) -> *const usize {ptr::const_ptr::::add}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(*const usize, usize) -> *const usize {ptr::const_ptr::::add}, val: Value() } } bb2: { @@ -176,7 +176,7 @@ fn array_casts() -> () { _28 = core::panicking::assert_failed::(move _29, move _30, move _32, move _34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r usize, &'s usize, Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r usize, &'s usize, Option>) -> ! {core::panicking::assert_failed::}, val: Value() } } bb4: { diff --git a/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir b/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir index 09cf06cacd920..8057aa13a9ffb 100644 --- a/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir +++ b/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir @@ -11,7 +11,7 @@ fn std::ptr::drop_in_place(_1: *mut Test) -> () { _3 = ::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: for<'r> fn(&'r mut Test) {::drop}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r mut Test) {::drop}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir index 89b1ded7f932f..a3490d460ec54 100644 --- a/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir @@ -74,7 +74,7 @@ fn main() -> () { _3 = Test::foo(move _4, move _6) -> [return: bb1, unwind: bb8]; // scope 1 at $DIR/retag.rs:32:17: 32:36 // mir::Constant // + span: $DIR/retag.rs:32:25: 32:28 - // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x mut i32) -> &'x mut i32 {Test::foo}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x mut i32) -> &'x mut i32 {Test::foo}, val: Value() } } bb1: { @@ -159,7 +159,7 @@ fn main() -> () { _19 = Test::foo_shr(move _20, move _22) -> [return: bb4, unwind: bb7]; // scope 7 at $DIR/retag.rs:47:5: 47:24 // mir::Constant // + span: $DIR/retag.rs:47:13: 47:20 - // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x i32) -> &'x i32 {Test::foo_shr}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x i32) -> &'x i32 {Test::foo_shr}, val: Value() } } bb4: { @@ -183,7 +183,7 @@ fn main() -> () { _27 = array_casts() -> bb6; // scope 8 at $DIR/retag.rs:52:5: 52:18 // mir::Constant // + span: $DIR/retag.rs:52:5: 52:16 - // + literal: Const { ty: fn() {array_casts}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {array_casts}, val: Value() } } bb6: { diff --git a/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff index 1c5a890023648..6d41d5b7437f5 100644 --- a/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff +++ b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff @@ -21,7 +21,7 @@ + _2 = bar() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/simplify_cfg.rs:9:12: 9:17 // mir::Constant // + span: $DIR/simplify_cfg.rs:9:12: 9:15 - // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {bar}, val: Value() } } - bb3: { diff --git a/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff index b079bd7b57c42..78841d28b85b1 100644 --- a/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff +++ b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff @@ -22,7 +22,7 @@ + _2 = bar() -> [return: bb3, unwind: bb6]; // scope 0 at $DIR/simplify_cfg.rs:9:12: 9:17 // mir::Constant // + span: $DIR/simplify_cfg.rs:9:12: 9:15 - // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> bool {bar}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff b/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff index d11c70b1efec6..f729b53b20410 100644 --- a/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff +++ b/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff @@ -18,7 +18,7 @@ _2 = noop() -> bb2; // scope 0 at $DIR/simplify_if.rs:7:9: 7:15 // mir::Constant // + span: $DIR/simplify_if.rs:7:9: 7:13 - // + literal: Const { ty: fn() {noop}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {noop}, val: Value() } } bb2: { diff --git a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff index 1bba1e9e88a4e..f4f1b9d4eb87e 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff @@ -15,7 +15,8 @@ - let mut _10: u8; // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 - let mut _11: Temp; // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 + let _1: (); // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 -+ let _2: (); // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 ++ let mut _2: ((), ()); // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21 ++ let _3: (); // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 scope 1 { } @@ -32,12 +33,13 @@ - StorageLive(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 - StorageDead(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 - StorageDead(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 -- _4 = use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 +- _4 = use_zst(move _5) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 + StorageLive(_1); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 -+ _1 = use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 ++ StorageLive(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21 ++ _1 = use_zst(move _2) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 // mir::Constant // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:12 - // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value(Scalar()) } + // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value() } } bb1: { @@ -49,19 +51,20 @@ - StorageLive(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 - StorageDead(_10); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34 - _8 = use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 ++ StorageDead(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:21: 14:22 + StorageDead(_1); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23 -+ StorageLive(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 -+ _2 = use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 ++ StorageLive(_3); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 ++ _3 = use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 // mir::Constant // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:11 - // + literal: Const { ty: fn(u8) {use_u8}, val: Value(Scalar()) } + // + literal: Const { ty: fn(u8) {use_u8}, val: Value() } } bb2: { - StorageDead(_9); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:34: 16:35 - StorageDead(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 - StorageDead(_8); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 -+ StorageDead(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 ++ StorageDead(_3); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 return; // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/simplify_match.main.ConstProp.diff b/src/test/mir-opt/simplify_match.main.ConstProp.diff index 1c8d043a6030c..6314abe6f39db 100644 --- a/src/test/mir-opt/simplify_match.main.ConstProp.diff +++ b/src/test/mir-opt/simplify_match.main.ConstProp.diff @@ -29,7 +29,7 @@ _0 = noop() -> bb3; // scope 0 at $DIR/simplify_match.rs:7:17: 7:23 // mir::Constant // + span: $DIR/simplify_match.rs:7:17: 7:21 - // + literal: Const { ty: fn() {noop}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {noop}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir index d7d2cdf9b0c75..d36d369003a63 100644 --- a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir @@ -33,7 +33,7 @@ fn move_out_by_subslice() -> () { _5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12]; // scope 2 at $DIR/uniform_array_move_out.rs:11:14: 11:19 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:11:14: 11:19 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -52,7 +52,7 @@ fn move_out_by_subslice() -> () { _10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11]; // scope 3 at $DIR/uniform_array_move_out.rs:11:21: 11:26 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:11:21: 11:26 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir index 18bc1a17c1b50..e6c8b66c25af0 100644 --- a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir @@ -33,7 +33,7 @@ fn move_out_from_end() -> () { _5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12]; // scope 2 at $DIR/uniform_array_move_out.rs:5:14: 5:19 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:14: 5:19 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb1: { @@ -52,7 +52,7 @@ fn move_out_from_end() -> () { _10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11]; // scope 3 at $DIR/uniform_array_move_out.rs:5:21: 5:26 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:21: 5:26 - // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar()) } + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value() } } bb3: { diff --git a/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff index 70486f546d71b..5aa4f1b343249 100644 --- a/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff @@ -22,7 +22,7 @@ _1 = empty() -> bb1; // scope 1 at $DIR/unreachable.rs:9:23: 9:30 // mir::Constant // + span: $DIR/unreachable.rs:9:23: 9:28 - // + literal: Const { ty: fn() -> Option {empty}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> Option {empty}, val: Value() } } bb1: { diff --git a/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff index d9f2681d145e6..b95ab881ef05d 100644 --- a/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff @@ -24,7 +24,7 @@ _2 = empty() -> bb1; // scope 2 at $DIR/unreachable_diverging.rs:14:25: 14:32 // mir::Constant // + span: $DIR/unreachable_diverging.rs:14:25: 14:30 - // + literal: Const { ty: fn() -> Option {empty}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> Option {empty}, val: Value() } } bb1: { @@ -48,7 +48,7 @@ + _5 = loop_forever() -> bb4; // scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 // mir::Constant // + span: $DIR/unreachable_diverging.rs:16:13: 16:25 - // + literal: Const { ty: fn() {loop_forever}, val: Value(Scalar()) } + // + literal: Const { ty: fn() {loop_forever}, val: Value() } } bb4: { diff --git a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.32bit.mir b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.32bit.mir index 5dc81b787a9fa..54ecaccdb4fb8 100644 --- a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.32bit.mir +++ b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.32bit.mir @@ -34,6 +34,6 @@ fn std::ptr::drop_in_place(_1: *mut Vec) -> () { _3 = as Drop>::drop(move _2) -> [return: bb5, unwind: bb4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: for<'r> fn(&'r mut Vec) { as Drop>::drop}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r mut Vec) { as Drop>::drop}, val: Value() } } } diff --git a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.64bit.mir b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.64bit.mir index 5dc81b787a9fa..54ecaccdb4fb8 100644 --- a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.64bit.mir +++ b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.64bit.mir @@ -34,6 +34,6 @@ fn std::ptr::drop_in_place(_1: *mut Vec) -> () { _3 = as Drop>::drop(move _2) -> [return: bb5, unwind: bb4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: for<'r> fn(&'r mut Vec) { as Drop>::drop}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r> fn(&'r mut Vec) { as Drop>::drop}, val: Value() } } } diff --git a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir index ec2d161251b00..f1c5d95df1903 100644 --- a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir +++ b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir @@ -19,7 +19,7 @@ fn while_loop(_1: bool) -> () { _2 = get_bool(move _3) -> bb2; // scope 0 at $DIR/while-storage.rs:10:11: 10:22 // mir::Constant // + span: $DIR/while-storage.rs:10:11: 10:19 - // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar()) } + // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value() } } bb2: { @@ -34,7 +34,7 @@ fn while_loop(_1: bool) -> () { _4 = get_bool(move _5) -> bb4; // scope 0 at $DIR/while-storage.rs:11:12: 11:23 // mir::Constant // + span: $DIR/while-storage.rs:11:12: 11:20 - // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar()) } + // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value() } } bb4: { diff --git a/src/test/run-make/const_fn_mir/dump.mir b/src/test/run-make/const_fn_mir/dump.mir index f02bccc4b2da5..ab4084c952a3d 100644 --- a/src/test/run-make/const_fn_mir/dump.mir +++ b/src/test/run-make/const_fn_mir/dump.mir @@ -33,7 +33,7 @@ fn main() -> () { _1 = foo() -> bb1; // scope 0 at main.rs:9:5: 9:10 // mir::Constant // + span: main.rs:9:5: 9:8 - // + literal: Const { ty: fn() -> i32 {foo}, val: Value(Scalar()) } + // + literal: Const { ty: fn() -> i32 {foo}, val: Value() } } bb1: {