Auto merge of #73656 - oli-obk:deaggregate-is-cleanup, r=wesleywiser
move Deaggregate pass to post_borrowck_cleanup Reopen of #71946 Only the second commit is from this PR, the other commit is a bugfix that's in the process of getting merged. I'll rebase once that's done In #70073 MIR pass handling got reorganized, but with the goal of not changing behavior (except for disabling some optimizations on opt-level = 0). But there we realized that the Deaggregator pass, while conceptually more of a "cleanup" pass (and one that should be run before optimizations), was run in the middle of the optimization chain. Likely this is an accident of history, so I suggest we try and clean that up by making it a proper cleanup pass. This does change mir-opt output, because deaggregation now runs before const-prop instead of after. r? @wesleywiser @rust-lang/wg-mir-opt cc @RalfJung
This commit is contained in:
commit
cbe7c5ce70
@ -74,7 +74,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
fn statement(&mut self, stmt: &mir::Statement<'tcx>) -> InterpResult<'tcx> {
|
||||
/// Runs the interpretation logic for the given `mir::Statement` at the current frame and
|
||||
/// statement counter. This also moves the statement counter forward.
|
||||
crate fn statement(&mut self, stmt: &mir::Statement<'tcx>) -> InterpResult<'tcx> {
|
||||
info!("{:?}", stmt);
|
||||
|
||||
use rustc_middle::mir::StatementKind::*;
|
||||
|
@ -252,6 +252,11 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx>
|
||||
throw_machine_stop_str!("tried to write to a local that is marked as not propagatable")
|
||||
}
|
||||
if frame == 0 && ecx.machine.only_propagate_inside_block_locals.contains(local) {
|
||||
trace!(
|
||||
"mutating local {:?} which is restricted to its block. \
|
||||
Will remove it from const-prop after block is finished.",
|
||||
local
|
||||
);
|
||||
ecx.machine.written_only_inside_own_block_locals.insert(local);
|
||||
}
|
||||
ecx.machine.stack[frame].locals[local].access_mut()
|
||||
@ -427,6 +432,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
match f(self) {
|
||||
Ok(val) => Some(val),
|
||||
Err(error) => {
|
||||
trace!("InterpCx operation failed: {:?}", error);
|
||||
// Some errors shouldn't come up because creating them causes
|
||||
// an allocation, which we should avoid. When that happens,
|
||||
// dedicated error variants should be introduced instead.
|
||||
@ -969,10 +975,10 @@ impl<'tcx> Visitor<'tcx> for CanConstProp {
|
||||
ConstPropMode::OnlyPropagateInto => {}
|
||||
other @ ConstPropMode::FullConstProp => {
|
||||
trace!(
|
||||
"local {:?} can't be propagated because of multiple assignments",
|
||||
local,
|
||||
"local {:?} can't be propagated because of multiple assignments. Previous state: {:?}",
|
||||
local, other,
|
||||
);
|
||||
*other = ConstPropMode::OnlyPropagateInto;
|
||||
*other = ConstPropMode::OnlyInsideOwnBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1089,6 +1095,20 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
|
||||
}
|
||||
} else {
|
||||
match statement.kind {
|
||||
StatementKind::SetDiscriminant { ref place, .. } => {
|
||||
match self.ecx.machine.can_const_prop[place.local] {
|
||||
ConstPropMode::FullConstProp | ConstPropMode::OnlyInsideOwnBlock => {
|
||||
if self.use_ecx(|this| this.ecx.statement(statement)).is_some() {
|
||||
trace!("propped discriminant into {:?}", place);
|
||||
} else {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
ConstPropMode::OnlyPropagateInto | ConstPropMode::NoPropagation => {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
}
|
||||
StatementKind::StorageLive(local) | StatementKind::StorageDead(local) => {
|
||||
let frame = self.ecx.frame_mut();
|
||||
frame.locals[local].value =
|
||||
|
@ -408,6 +408,9 @@ fn run_post_borrowck_cleanup_passes<'tcx>(
|
||||
// but before optimizations begin.
|
||||
&add_retag::AddRetag,
|
||||
&simplify::SimplifyCfg::new("elaborate-drops"),
|
||||
// `Deaggregator` is conceptually part of MIR building, some backends rely on it happening
|
||||
// and it can help optimizations.
|
||||
&deaggregator::Deaggregator,
|
||||
];
|
||||
|
||||
run_passes(
|
||||
@ -439,11 +442,6 @@ fn run_optimization_passes<'tcx>(
|
||||
&instcombine::InstCombine,
|
||||
&const_prop::ConstProp,
|
||||
&simplify_branches::SimplifyBranches::new("after-const-prop"),
|
||||
// Run deaggregation here because:
|
||||
// 1. Some codegen backends require it
|
||||
// 2. It creates additional possibilities for some MIR optimizations to trigger
|
||||
// FIXME(#70073): Why is this done here and not in `post_borrowck_cleanup`?
|
||||
&deaggregator::Deaggregator,
|
||||
&simplify_try::SimplifyArmIdentity,
|
||||
&simplify_try::SimplifyBranchSame,
|
||||
©_prop::CopyPropagation,
|
||||
@ -460,9 +458,6 @@ fn run_optimization_passes<'tcx>(
|
||||
&generator::StateTransform,
|
||||
// FIXME(#70073): This pass is responsible for both optimization as well as some lints.
|
||||
&const_prop::ConstProp,
|
||||
// Even if we don't do optimizations, still run deaggregation because some backends assume
|
||||
// that deaggregation always occurs.
|
||||
&deaggregator::Deaggregator,
|
||||
];
|
||||
|
||||
let pre_codegen_cleanup: &[&dyn MirPass<'tcx>] = &[
|
||||
|
@ -10,11 +10,11 @@
|
||||
// CHECK: @STATIC = {{.*}}, align 4
|
||||
|
||||
// This checks the constants from inline_enum_const
|
||||
// CHECK: @alloc7 = {{.*}}, align 2
|
||||
// CHECK: @alloc8 = {{.*}}, align 2
|
||||
|
||||
// This checks the constants from {low,high}_align_const, they share the same
|
||||
// constant, but the alignment differs, so the higher one should be used
|
||||
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc19, i32 0, i32 0, i32 0), {{.*}}
|
||||
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc20, i32 0, i32 0, i32 0), {{.*}}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
// repr(i16) is required for the {low,high}_align_const test
|
||||
|
@ -14,19 +14,21 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/aggregate.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
|
||||
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
_3 = (const 0_i32, const 1_i32, const 2_i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/aggregate.rs:5:14: 5:15
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
||||
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $DIR/aggregate.rs:5:17: 5:18
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000002))
|
||||
|
@ -15,19 +15,16 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _3 = std::option::Option::<bool>::Some(const true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
+ _3 = const std::option::Option::<bool>::Some(true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
// ty::Const
|
||||
- // + ty: bool
|
||||
+ // + ty: std::option::Option<bool>
|
||||
// + ty: bool
|
||||
// + val: Value(Scalar(0x01))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/discriminant.rs:11:39: 11:43
|
||||
- // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
// + span: $DIR/discriminant.rs:11:39: 11:43
|
||||
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ // + span: $DIR/discriminant.rs:11:34: 11:44
|
||||
+ // + literal: Const { ty: std::option::Option<bool>, val: Value(Scalar(0x01)) }
|
||||
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
@ -56,14 +53,7 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
+ switchInt(const true) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
+ // ty::Const
|
||||
+ // + ty: bool
|
||||
+ // + val: Value(Scalar(0x01))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/discriminant.rs:11:26: 11:30
|
||||
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
@ -15,19 +15,16 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _3 = std::option::Option::<bool>::Some(const true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
+ _3 = const std::option::Option::<bool>::Some(true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
// ty::Const
|
||||
- // + ty: bool
|
||||
+ // + ty: std::option::Option<bool>
|
||||
// + ty: bool
|
||||
// + val: Value(Scalar(0x01))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/discriminant.rs:11:39: 11:43
|
||||
- // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
// + span: $DIR/discriminant.rs:11:39: 11:43
|
||||
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ // + span: $DIR/discriminant.rs:11:34: 11:44
|
||||
+ // + literal: Const { ty: std::option::Option<bool>, val: Value(Scalar(0x01)) }
|
||||
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
@ -56,14 +53,7 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
+ switchInt(const true) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
+ // ty::Const
|
||||
+ // + ty: bool
|
||||
+ // + val: Value(Scalar(0x01))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/discriminant.rs:11:26: 11:30
|
||||
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
@ -11,21 +11,22 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
- _3 = (); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
+ _3 = const (); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
- (_2.0: ()) = move _3; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
+ (_2.0: ()) = const (); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
+ // ty::Const
|
||||
+ // + ty: ()
|
||||
+ // + val: Value(Scalar(<ZST>))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/issue-66971.rs:16:13: 16:15
|
||||
+ // + span: $DIR/issue-66971.rs:16:12: 16:22
|
||||
+ // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
_2 = (move _3, const 0_u8, const 0_u8); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
// ty::Const
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x00))
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-66971.rs:16:17: 16:18
|
||||
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
|
||||
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
// ty::Const
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x00))
|
||||
|
@ -11,22 +11,34 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
_3 = (const 1_u8, const 2_u8); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
(_3.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
// ty::Const
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x01))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/issue-67019.rs:11:12: 11:13
|
||||
+ // + span: $DIR/issue-67019.rs:11:11: 11:17
|
||||
// + span: $DIR/issue-67019.rs:11:12: 11:13
|
||||
// + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
|
||||
(_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
// ty::Const
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x02))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/issue-67019.rs:11:15: 11:16
|
||||
+ // + span: $DIR/issue-67019.rs:11:11: 11:17
|
||||
// + span: $DIR/issue-67019.rs:11:15: 11:16
|
||||
// + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
|
||||
_2 = (move _3,); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
- (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
+ (_2.0: (u8, u8)) = (const 1_u8, const 2_u8); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
+ // ty::Const
|
||||
+ // + ty: u8
|
||||
+ // + val: Value(Scalar(0x01))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/issue-67019.rs:11:10: 11:19
|
||||
+ // + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
|
||||
+ // ty::Const
|
||||
+ // + ty: u8
|
||||
+ // + val: Value(Scalar(0x02))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/issue-67019.rs:11:10: 11:19
|
||||
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:11:18: 11:19
|
||||
_1 = const test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
|
||||
// ty::Const
|
||||
|
@ -14,20 +14,19 @@
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x0000002a))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/mutable_variable_aggregate.rs:5:18: 5:20
|
||||
+ // + span: $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
// + span: $DIR/mutable_variable_aggregate.rs:5:18: 5:20
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x0000002b))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/mutable_variable_aggregate.rs:5:22: 5:24
|
||||
+ // + span: $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
// + span: $DIR/mutable_variable_aggregate.rs:5:22: 5:24
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002b)) }
|
||||
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:6:5: 6:13
|
||||
// ty::Const
|
||||
|
@ -18,13 +18,14 @@
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x0000002a))
|
||||
// mir::Constant
|
||||
// + span: $DIR/mutable_variable_aggregate_mut_ref.rs:5:18: 5:20
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x0000002b))
|
||||
|
@ -34,20 +34,19 @@
|
||||
|
||||
bb1: {
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
|
||||
_2 = (const 1_i32, const 2_i32); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
(_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/mutable_variable_unprop_assign.rs:6:30: 6:31
|
||||
+ // + span: $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
// + span: $DIR/mutable_variable_unprop_assign.rs:6:30: 6:31
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
(_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000002))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/mutable_variable_unprop_assign.rs:6:33: 6:34
|
||||
+ // + span: $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
// + span: $DIR/mutable_variable_unprop_assign.rs:6:33: 6:34
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
_3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
|
@ -173,13 +173,14 @@
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
_9 = Point { x: const 12_u32, y: const 42_u32 }; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x0000000c))
|
||||
// mir::Constant
|
||||
// + span: $DIR/optimizes_into_variable.rs:14:25: 14:27
|
||||
// + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) }
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x0000002a))
|
||||
|
@ -173,13 +173,14 @@
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
_9 = Point { x: const 12_u32, y: const 42_u32 }; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x0000000c))
|
||||
// mir::Constant
|
||||
// + span: $DIR/optimizes_into_variable.rs:14:25: 14:27
|
||||
// + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) }
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x0000002a))
|
||||
|
@ -12,20 +12,19 @@
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
|
||||
_1 = (const 1_u32, const 2_u32); // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
(_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/tuple_literal_propagation.rs:3:14: 3:15
|
||||
+ // + span: $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
// + span: $DIR/tuple_literal_propagation.rs:3:14: 3:15
|
||||
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
|
||||
(_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x00000002))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/tuple_literal_propagation.rs:3:17: 3:18
|
||||
+ // + span: $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
// + span: $DIR/tuple_literal_propagation.rs:3:17: 3:18
|
||||
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
|
||||
StorageLive(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
|
||||
|
@ -19,17 +19,13 @@
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14
|
||||
- _1 = (const 1_i32,); // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
+ _1 = const (1_i32,); // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
// ty::Const
|
||||
- // + ty: i32
|
||||
+ // + ty: (i32,)
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/const_prop_miscompile.rs:12:18: 12:19
|
||||
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
+ // + span: $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
+ // + literal: Const { ty: (i32,), val: Value(Scalar(0x00000001)) }
|
||||
// + span: $DIR/const_prop_miscompile.rs:12:18: 12:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:13:5: 15:6
|
||||
StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
|
||||
_3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
|
||||
|
@ -16,17 +16,13 @@
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14
|
||||
- _1 = (const 1_i32,); // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
+ _1 = const (1_i32,); // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
// ty::Const
|
||||
- // + ty: i32
|
||||
+ // + ty: (i32,)
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
- // + span: $DIR/const_prop_miscompile.rs:5:18: 5:19
|
||||
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
+ // + span: $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
+ // + literal: Const { ty: (i32,), val: Value(Scalar(0x00000001)) }
|
||||
// + span: $DIR/const_prop_miscompile.rs:5:18: 5:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
|
||||
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
|
||||
(*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:6:5: 6:18
|
||||
|
@ -0,0 +1,162 @@
|
||||
- // MIR for `float_to_exponential_common` before ConstProp
|
||||
+ // MIR for `float_to_exponential_common` after ConstProp
|
||||
|
||||
fn float_to_exponential_common(_1: &mut std::fmt::Formatter, _2: &T, _3: bool) -> std::result::Result<(), std::fmt::Error> {
|
||||
debug fmt => _1; // in scope 0 at $DIR/funky_arms.rs:11:35: 11:38
|
||||
debug num => _2; // in scope 0 at $DIR/funky_arms.rs:11:60: 11:63
|
||||
debug upper => _3; // in scope 0 at $DIR/funky_arms.rs:11:69: 11:74
|
||||
let mut _0: std::result::Result<(), std::fmt::Error>; // return place in scope 0 at $DIR/funky_arms.rs:11:85: 11:91
|
||||
let _4: bool; // in scope 0 at $DIR/funky_arms.rs:15:9: 15:19
|
||||
let mut _5: &std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:15:22: 15:25
|
||||
let mut _7: std::option::Option<usize>; // in scope 0 at $DIR/funky_arms.rs:24:30: 24:45
|
||||
let mut _8: &std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:24:30: 24:33
|
||||
let mut _9: isize; // in scope 0 at $DIR/funky_arms.rs:24:12: 24:27
|
||||
let mut _11: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:26:43: 26:46
|
||||
let mut _12: &T; // in scope 0 at $DIR/funky_arms.rs:26:48: 26:51
|
||||
let mut _13: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:26:53: 26:57
|
||||
let mut _14: u32; // in scope 0 at $DIR/funky_arms.rs:26:59: 26:79
|
||||
let mut _15: u32; // in scope 0 at $DIR/funky_arms.rs:26:59: 26:75
|
||||
let mut _16: usize; // in scope 0 at $DIR/funky_arms.rs:26:59: 26:68
|
||||
let mut _17: bool; // in scope 0 at $DIR/funky_arms.rs:26:81: 26:86
|
||||
let mut _18: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:28:46: 28:49
|
||||
let mut _19: &T; // in scope 0 at $DIR/funky_arms.rs:28:51: 28:54
|
||||
let mut _20: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:28:56: 28:60
|
||||
let mut _21: bool; // in scope 0 at $DIR/funky_arms.rs:28:62: 28:67
|
||||
scope 1 {
|
||||
debug force_sign => _4; // in scope 1 at $DIR/funky_arms.rs:15:9: 15:19
|
||||
let _6: core::num::flt2dec::Sign; // in scope 1 at $DIR/funky_arms.rs:19:9: 19:13
|
||||
scope 2 {
|
||||
debug sign => _6; // in scope 2 at $DIR/funky_arms.rs:19:9: 19:13
|
||||
let _10: usize; // in scope 2 at $DIR/funky_arms.rs:24:17: 24:26
|
||||
scope 3 {
|
||||
debug precision => _10; // in scope 3 at $DIR/funky_arms.rs:24:17: 24:26
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_4); // scope 0 at $DIR/funky_arms.rs:15:9: 15:19
|
||||
StorageLive(_5); // scope 0 at $DIR/funky_arms.rs:15:22: 15:25
|
||||
_5 = &(*_1); // scope 0 at $DIR/funky_arms.rs:15:22: 15:25
|
||||
_4 = const std::fmt::Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:15:22: 15:37
|
||||
// ty::Const
|
||||
// + ty: for<'r> fn(&'r std::fmt::Formatter) -> bool {std::fmt::Formatter::sign_plus}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:15:26: 15:35
|
||||
// + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> bool {std::fmt::Formatter::sign_plus}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_5); // scope 0 at $DIR/funky_arms.rs:15:36: 15:37
|
||||
StorageLive(_6); // scope 1 at $DIR/funky_arms.rs:19:9: 19:13
|
||||
switchInt(_4) -> [false: bb3, otherwise: bb2]; // scope 1 at $DIR/funky_arms.rs:20:9: 20:14
|
||||
}
|
||||
|
||||
bb2: {
|
||||
discriminant(_6) = 2; // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
|
||||
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:19:16: 22:6
|
||||
}
|
||||
|
||||
bb3: {
|
||||
discriminant(_6) = 0; // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
|
||||
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:19:16: 22:6
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_7); // scope 2 at $DIR/funky_arms.rs:24:30: 24:45
|
||||
StorageLive(_8); // scope 2 at $DIR/funky_arms.rs:24:30: 24:33
|
||||
_8 = &(*_1); // scope 2 at $DIR/funky_arms.rs:24:30: 24:33
|
||||
_7 = const std::fmt::Formatter::precision(move _8) -> bb5; // scope 2 at $DIR/funky_arms.rs:24:30: 24:45
|
||||
// ty::Const
|
||||
// + ty: for<'r> fn(&'r std::fmt::Formatter) -> std::option::Option<usize> {std::fmt::Formatter::precision}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:24:34: 24:43
|
||||
// + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> std::option::Option<usize> {std::fmt::Formatter::precision}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_8); // scope 2 at $DIR/funky_arms.rs:24:44: 24:45
|
||||
_9 = discriminant(_7); // scope 2 at $DIR/funky_arms.rs:24:12: 24:27
|
||||
switchInt(move _9) -> [1_isize: bb7, otherwise: bb6]; // scope 2 at $DIR/funky_arms.rs:24:12: 24:27
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageLive(_18); // scope 2 at $DIR/funky_arms.rs:28:46: 28:49
|
||||
_18 = &mut (*_1); // scope 2 at $DIR/funky_arms.rs:28:46: 28:49
|
||||
StorageLive(_19); // scope 2 at $DIR/funky_arms.rs:28:51: 28:54
|
||||
_19 = _2; // scope 2 at $DIR/funky_arms.rs:28:51: 28:54
|
||||
StorageLive(_20); // scope 2 at $DIR/funky_arms.rs:28:56: 28:60
|
||||
_20 = _6; // scope 2 at $DIR/funky_arms.rs:28:56: 28:60
|
||||
StorageLive(_21); // scope 2 at $DIR/funky_arms.rs:28:62: 28:67
|
||||
_21 = _3; // scope 2 at $DIR/funky_arms.rs:28:62: 28:67
|
||||
_0 = const float_to_exponential_common_shortest::<T>(move _18, move _19, move _20, move _21) -> bb9; // scope 2 at $DIR/funky_arms.rs:28:9: 28:68
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:28:9: 28:45
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb7: {
|
||||
StorageLive(_10); // scope 2 at $DIR/funky_arms.rs:24:17: 24:26
|
||||
_10 = ((_7 as Some).0: usize); // scope 2 at $DIR/funky_arms.rs:24:17: 24:26
|
||||
StorageLive(_11); // scope 3 at $DIR/funky_arms.rs:26:43: 26:46
|
||||
_11 = &mut (*_1); // scope 3 at $DIR/funky_arms.rs:26:43: 26:46
|
||||
StorageLive(_12); // scope 3 at $DIR/funky_arms.rs:26:48: 26:51
|
||||
_12 = _2; // scope 3 at $DIR/funky_arms.rs:26:48: 26:51
|
||||
StorageLive(_13); // scope 3 at $DIR/funky_arms.rs:26:53: 26:57
|
||||
_13 = _6; // scope 3 at $DIR/funky_arms.rs:26:53: 26:57
|
||||
StorageLive(_14); // scope 3 at $DIR/funky_arms.rs:26:59: 26:79
|
||||
StorageLive(_15); // scope 3 at $DIR/funky_arms.rs:26:59: 26:75
|
||||
StorageLive(_16); // scope 3 at $DIR/funky_arms.rs:26:59: 26:68
|
||||
_16 = _10; // scope 3 at $DIR/funky_arms.rs:26:59: 26:68
|
||||
_15 = move _16 as u32 (Misc); // scope 3 at $DIR/funky_arms.rs:26:59: 26:75
|
||||
StorageDead(_16); // scope 3 at $DIR/funky_arms.rs:26:74: 26:75
|
||||
_14 = Add(move _15, const 1_u32); // scope 3 at $DIR/funky_arms.rs:26:59: 26:79
|
||||
// ty::Const
|
||||
// + ty: u32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:26:78: 26:79
|
||||
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
|
||||
StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:26:78: 26:79
|
||||
StorageLive(_17); // scope 3 at $DIR/funky_arms.rs:26:81: 26:86
|
||||
_17 = _3; // scope 3 at $DIR/funky_arms.rs:26:81: 26:86
|
||||
_0 = const float_to_exponential_common_exact::<T>(move _11, move _12, move _13, move _14, move _17) -> bb8; // scope 3 at $DIR/funky_arms.rs:26:9: 26:87
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, u32, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:26:9: 26:42
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, u32, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb8: {
|
||||
StorageDead(_17); // scope 3 at $DIR/funky_arms.rs:26:86: 26:87
|
||||
StorageDead(_14); // scope 3 at $DIR/funky_arms.rs:26:86: 26:87
|
||||
StorageDead(_13); // scope 3 at $DIR/funky_arms.rs:26:86: 26:87
|
||||
StorageDead(_12); // scope 3 at $DIR/funky_arms.rs:26:86: 26:87
|
||||
StorageDead(_11); // scope 3 at $DIR/funky_arms.rs:26:86: 26:87
|
||||
StorageDead(_10); // scope 2 at $DIR/funky_arms.rs:27:5: 27:6
|
||||
goto -> bb10; // scope 2 at $DIR/funky_arms.rs:24:5: 29:6
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_21); // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
|
||||
StorageDead(_20); // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
|
||||
StorageDead(_19); // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
|
||||
StorageDead(_18); // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
|
||||
goto -> bb10; // scope 2 at $DIR/funky_arms.rs:24:5: 29:6
|
||||
}
|
||||
|
||||
bb10: {
|
||||
StorageDead(_6); // scope 1 at $DIR/funky_arms.rs:30:1: 30:2
|
||||
StorageDead(_4); // scope 0 at $DIR/funky_arms.rs:30:1: 30:2
|
||||
StorageDead(_7); // scope 0 at $DIR/funky_arms.rs:30:1: 30:2
|
||||
return; // scope 0 at $DIR/funky_arms.rs:30:2: 30:2
|
||||
}
|
||||
}
|
||||
|
56
src/test/mir-opt/funky_arms.rs
Normal file
56
src/test/mir-opt/funky_arms.rs
Normal file
@ -0,0 +1,56 @@
|
||||
// compile-flags: --crate-type lib -Cdebug-assertions=no
|
||||
|
||||
#![feature(flt2dec)]
|
||||
|
||||
extern crate core;
|
||||
|
||||
use core::num::flt2dec;
|
||||
use std::fmt::{Formatter, Result};
|
||||
|
||||
// EMIT_MIR funky_arms.float_to_exponential_common.ConstProp.diff
|
||||
fn float_to_exponential_common<T>(fmt: &mut Formatter<'_>, num: &T, upper: bool) -> Result
|
||||
where
|
||||
T: flt2dec::DecodableFloat,
|
||||
{
|
||||
let force_sign = fmt.sign_plus();
|
||||
// A bug in const propagation (never reached master, but during dev of a PR) caused the
|
||||
// `sign = Minus` assignment to get propagated into all future reads of `sign`. This is
|
||||
// wrong because `sign` could also have `MinusPlus` value.
|
||||
let sign = match force_sign {
|
||||
false => flt2dec::Sign::Minus,
|
||||
true => flt2dec::Sign::MinusPlus,
|
||||
};
|
||||
|
||||
if let Some(precision) = fmt.precision() {
|
||||
// 1 integral digit + `precision` fractional digits = `precision + 1` total digits
|
||||
float_to_exponential_common_exact(fmt, num, sign, precision as u32 + 1, upper)
|
||||
} else {
|
||||
float_to_exponential_common_shortest(fmt, num, sign, upper)
|
||||
}
|
||||
}
|
||||
#[inline(never)]
|
||||
fn float_to_exponential_common_exact<T>(
|
||||
fmt: &mut Formatter<'_>,
|
||||
num: &T,
|
||||
sign: flt2dec::Sign,
|
||||
precision: u32,
|
||||
upper: bool,
|
||||
) -> Result
|
||||
where
|
||||
T: flt2dec::DecodableFloat,
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
fn float_to_exponential_common_shortest<T>(
|
||||
fmt: &mut Formatter<'_>,
|
||||
num: &T,
|
||||
sign: flt2dec::Sign,
|
||||
upper: bool,
|
||||
) -> Result
|
||||
where
|
||||
T: flt2dec::DecodableFloat,
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
@ -21,7 +21,7 @@ yields ()
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14
|
||||
_3 = Foo(const 5_i32); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
|
||||
(_3.0: i32) = const 5_i32; // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000005))
|
||||
@ -29,7 +29,7 @@ yields ()
|
||||
// + span: $DIR/generator-storage-dead-unwind.rs:23:21: 23:22
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
|
||||
StorageLive(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14
|
||||
_4 = Bar(const 6_i32); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
|
||||
(_4.0: i32) = const 6_i32; // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000006))
|
||||
@ -38,7 +38,6 @@ yields ()
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000006)) }
|
||||
StorageLive(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
|
||||
StorageLive(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
|
||||
_6 = (); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
|
||||
_5 = yield(move _6) -> [resume: bb2, drop: bb4]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,13 @@
|
||||
// MIR for `main::{{closure}}#0` 0 generator_resume
|
||||
/* generator_layout = GeneratorLayout {
|
||||
field_tys: {
|
||||
_0: HasDrop,
|
||||
},
|
||||
field_tys: {},
|
||||
variant_fields: {
|
||||
Unresumed(0): [],
|
||||
Returned (1): [],
|
||||
Panicked (2): [],
|
||||
Suspend0 (3): [_0],
|
||||
},
|
||||
storage_conflicts: BitMatrix(1x1) {
|
||||
(_0, _0),
|
||||
Suspend0 (3): [],
|
||||
},
|
||||
storage_conflicts: BitMatrix(0x0) {},
|
||||
} */
|
||||
|
||||
fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]>, _2: u8) -> std::ops::GeneratorState<(), ()> {
|
||||
@ -27,7 +23,7 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:
|
||||
let _10: u8; // in scope 0 at $DIR/generator-tiny.rs:19:17: 19:19
|
||||
let mut _11: u32; // in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
scope 1 {
|
||||
debug _d => (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop); // in scope 1 at $DIR/generator-tiny.rs:20:13: 20:15
|
||||
debug _d => _3; // in scope 1 at $DIR/generator-tiny.rs:20:13: 20:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
@ -37,8 +33,7 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:
|
||||
|
||||
bb1: {
|
||||
_10 = move _2; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
nop; // scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
|
||||
(((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop) = HasDrop; // scope 0 at $DIR/generator-tiny.rs:20:18: 20:25
|
||||
StorageLive(_3); // scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
|
||||
StorageLive(_4); // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
|
||||
goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
|
||||
}
|
||||
@ -46,7 +41,6 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:
|
||||
bb2: {
|
||||
StorageLive(_6); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
StorageLive(_7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
_7 = (); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
_0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]))) = 3; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
return; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
||||
@ -78,6 +72,7 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageLive(_3); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
StorageLive(_4); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
StorageLive(_6); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
StorageLive(_7); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
||||
|
@ -21,15 +21,6 @@ fn foo(_1: T, _2: i32) -> i32 {
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3); // scope 0 at $DIR/inline-closure.rs:11:9: 11:10
|
||||
_3 = [closure@foo::<T>::{{closure}}#0]; // scope 0 at $DIR/inline-closure.rs:11:13: 11:24
|
||||
// closure
|
||||
// + def_id: DefId(0:6 ~ inline_closure[317d]::foo[0]::{{closure}}[0])
|
||||
// + substs: [
|
||||
// T,
|
||||
// i8,
|
||||
// extern "rust-call" fn((i32, i32)) -> i32,
|
||||
// (),
|
||||
// ]
|
||||
StorageLive(_4); // scope 1 at $DIR/inline-closure.rs:12:5: 12:6
|
||||
_4 = &_3; // scope 1 at $DIR/inline-closure.rs:12:5: 12:6
|
||||
StorageLive(_5); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
@ -37,7 +28,8 @@ fn foo(_1: T, _2: i32) -> i32 {
|
||||
_6 = _2; // scope 1 at $DIR/inline-closure.rs:12:7: 12:8
|
||||
StorageLive(_7); // scope 1 at $DIR/inline-closure.rs:12:10: 12:11
|
||||
_7 = _2; // scope 1 at $DIR/inline-closure.rs:12:10: 12:11
|
||||
_5 = (move _6, move _7); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
(_5.0: i32) = move _6; // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
(_5.1: i32) = move _7; // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
_8 = move (_5.0: i32); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
_9 = move (_5.1: i32); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
|
||||
_0 = _8; // scope 2 at $DIR/inline-closure.rs:11:22: 11:24
|
||||
|
@ -24,15 +24,6 @@ fn foo(_1: T, _2: &i32) -> i32 {
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3); // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10
|
||||
_3 = [closure@foo::<T>::{{closure}}#0]; // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:13: 15:6
|
||||
// closure
|
||||
// + def_id: DefId(0:6 ~ inline_closure_borrows_arg[317d]::foo[0]::{{closure}}[0])
|
||||
// + substs: [
|
||||
// T,
|
||||
// i8,
|
||||
// for<'r, 's> extern "rust-call" fn((&'r i32, &'s i32)) -> i32,
|
||||
// (),
|
||||
// ]
|
||||
StorageLive(_4); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
|
||||
_4 = &_3; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
|
||||
StorageLive(_5); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
@ -40,7 +31,8 @@ fn foo(_1: T, _2: &i32) -> i32 {
|
||||
_6 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8
|
||||
StorageLive(_7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11
|
||||
_7 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11
|
||||
_5 = (move _6, move _7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
(_5.0: &i32) = move _6; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
(_5.1: &i32) = move _7; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
_8 = move (_5.0: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
_9 = move (_5.1: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
|
||||
_0 = (*_8); // scope 3 at $DIR/inline-closure-borrows-arg.rs:14:9: 14:18
|
||||
|
@ -28,15 +28,8 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
|
||||
_4 = &_2; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
StorageLive(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
_5 = &_1; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
_3 = [closure@foo::<T>::{{closure}}#0] { q: move _4, t: move _5 }; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
// closure
|
||||
// + def_id: DefId(0:6 ~ inline_closure_captures[317d]::foo[0]::{{closure}}[0])
|
||||
// + substs: [
|
||||
// T,
|
||||
// i8,
|
||||
// extern "rust-call" fn((i32,)) -> (i32, T),
|
||||
// (&i32, &T),
|
||||
// ]
|
||||
(_3.0: &i32) = move _4; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
(_3.1: &T) = move _5; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
||||
StorageDead(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
|
||||
StorageDead(_4); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
|
||||
StorageLive(_6); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6
|
||||
@ -44,7 +37,7 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
|
||||
StorageLive(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
||||
StorageLive(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
|
||||
_8 = _2; // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
|
||||
_7 = (move _8,); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
||||
(_7.0: i32) = move _8; // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
||||
_11 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
||||
StorageLive(_9); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20
|
||||
_9 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20
|
||||
|
@ -11,22 +11,20 @@
|
||||
let mut _9: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _11: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _12: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _13: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _14: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _15: &[&str]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _16: &[std::fmt::ArgumentV1]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _17: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _18: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _19: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _20: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _21: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _22: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _23: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _12: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: &[&str]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _15: &[std::fmt::ArgumentV1]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _16: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _17: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _18: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _19: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _20: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _21: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _24: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _25: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _26: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _28: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _29: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 1 {
|
||||
debug split => _2; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _3: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
@ -37,28 +35,28 @@
|
||||
scope 4 {
|
||||
debug left_val => _7; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _8; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _24: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _25: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _22: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _23: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 5 {
|
||||
debug arg0 => _24; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg0 => _22; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _23; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 6 {
|
||||
debug x => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _30: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _22; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _28: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _29: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug x => _25; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _29; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _32: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _33: &core::fmt::Opaque; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _23; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _30: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &core::fmt::Opaque; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
scope 10 {
|
||||
debug pieces => _15; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _16; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _34: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug pieces => _14; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _15; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _32: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -103,16 +101,18 @@
|
||||
StorageDead(_6); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = (_5.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_8 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_12 = (*_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_10 = Eq(move _11, move _12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
@ -121,7 +121,6 @@
|
||||
|
||||
bb1: {
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
|
||||
@ -136,40 +135,38 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_14); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_14 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &[&str; 3]
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
|
||||
StorageLive(_17); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_19); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_19 = &_20; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_21); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_21 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = &_21; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_22); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_23); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_23 = _8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_22 = &_23; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_19.0: &&i32) = move _20; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_19.1: &&i32) = move _22; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_22); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_24 = (_19.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_25 = (_19.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_21 = &_8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_18.0: &&i32) = move _19; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_18.1: &&i32) = move _21; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_21); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_22 = (_18.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_23 = (_18.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_30); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_30 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_28 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -179,8 +176,8 @@
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageLive(_31); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_31 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _24) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_29 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -190,20 +187,20 @@
|
||||
}
|
||||
|
||||
bb4: {
|
||||
(_26.0: &core::fmt::Opaque) = move _31; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_26.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _30; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_31); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_28); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_29 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_24.0: &core::fmt::Opaque) = move _29; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_24.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _28; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_32); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_32 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _29) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_30 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -213,8 +210,8 @@
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageLive(_33); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_33 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _25) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_31 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -224,23 +221,23 @@
|
||||
}
|
||||
|
||||
bb6: {
|
||||
(_28.0: &core::fmt::Opaque) = move _33; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_28.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _32; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_33); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_32); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_18 = [move _26, move _28]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_28); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_26.0: &core::fmt::Opaque) = move _31; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_26.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _30; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_17 = [move _24, move _26]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_17 = &_18; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_16 = move _17 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_34); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_34) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.0: &[&str]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _34; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.2: &[std::fmt::ArgumentV1]) = move _16; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_34); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_13 = &_14; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
const std::rt::begin_panic_fmt(move _13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_16 = &_17; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = move _16 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_32) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.0: &[&str]) = move _14; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _32; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.2: &[std::fmt::ArgumentV1]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
const std::rt::begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
|
@ -11,22 +11,20 @@
|
||||
let mut _9: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _11: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _12: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _13: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _14: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _15: &[&str]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _16: &[std::fmt::ArgumentV1]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _17: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _18: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _19: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _20: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _21: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _22: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _23: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _12: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: &[&str]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _15: &[std::fmt::ArgumentV1]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _16: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _17: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _18: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _19: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _20: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _21: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _24: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _25: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _26: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _28: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _29: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 1 {
|
||||
debug split => _2; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _3: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
@ -37,28 +35,28 @@
|
||||
scope 4 {
|
||||
debug left_val => _7; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _8; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _24: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _25: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _22: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _23: &&i32; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 5 {
|
||||
debug arg0 => _24; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg0 => _22; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _23; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 6 {
|
||||
debug x => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _30: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _22; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _28: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _29: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug x => _25; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _29; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _32: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _33: &core::fmt::Opaque; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _23; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _30: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &core::fmt::Opaque; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
scope 10 {
|
||||
debug pieces => _15; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _16; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _34: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug pieces => _14; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _15; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _32: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -103,16 +101,18 @@
|
||||
StorageDead(_6); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = (_5.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_8 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_12 = (*_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_10 = Eq(move _11, move _12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
@ -121,7 +121,6 @@
|
||||
|
||||
bb1: {
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
|
||||
@ -136,40 +135,38 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_14); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_14 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &[&str; 3]
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
|
||||
StorageLive(_17); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_19); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_19 = &_20; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_21); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_21 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = &_21; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_22); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_23); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_23 = _8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_22 = &_23; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_19.0: &&i32) = move _20; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_19.1: &&i32) = move _22; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_22); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_24 = (_19.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_25 = (_19.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_21 = &_8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_18.0: &&i32) = move _19; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_18.1: &&i32) = move _21; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_21); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_22 = (_18.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_23 = (_18.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_30); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_30 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_28 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -179,8 +176,8 @@
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageLive(_31); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_31 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _24) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_29 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -190,20 +187,20 @@
|
||||
}
|
||||
|
||||
bb4: {
|
||||
(_26.0: &core::fmt::Opaque) = move _31; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_26.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _30; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_31); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_28); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_29 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_24.0: &core::fmt::Opaque) = move _29; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_24.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _28; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = const <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_32); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_32 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _29) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_30 = const std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -213,8 +210,8 @@
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageLive(_33); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_33 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _25) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_31 = const std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
@ -224,23 +221,23 @@
|
||||
}
|
||||
|
||||
bb6: {
|
||||
(_28.0: &core::fmt::Opaque) = move _33; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_28.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _32; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_33); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_32); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_18 = [move _26, move _28]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_28); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_26.0: &core::fmt::Opaque) = move _31; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_26.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _30; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_17 = [move _24, move _26]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_17 = &_18; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_16 = move _17 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_34); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_34) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.0: &[&str]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _34; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_14.2: &[std::fmt::ArgumentV1]) = move _16; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_34); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_13 = &_14; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
const std::rt::begin_panic_fmt(move _13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_16 = &_17; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = move _16 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_32) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.0: &[&str]) = move _14; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _32; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.2: &[std::fmt::ArgumentV1]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
const std::rt::begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
|
@ -165,8 +165,20 @@
|
||||
StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = (*_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_16 = Eq(move _17, move _18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
_16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
|
@ -165,8 +165,20 @@
|
||||
StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = (*_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_16 = Eq(move _17, move _18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
_16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
|
@ -39,13 +39,14 @@
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_2 = const Dst::Foo(0_u8); // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
((_2 as Foo).0: u8) = const 0_u8; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
// ty::Const
|
||||
// + ty: Dst
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x00))
|
||||
// mir::Constant
|
||||
// + span: $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
// + literal: Const { ty: Dst, val: Value(Scalar(0x00)) }
|
||||
// + span: $DIR/simplify-arm-identity.rs:21:30: 21:31
|
||||
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
|
||||
discriminant(_2) = 0; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,14 @@
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_2 = const Dst::Foo(0_u8); // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
((_2 as Foo).0: u8) = const 0_u8; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
// ty::Const
|
||||
// + ty: Dst
|
||||
// + ty: u8
|
||||
// + val: Value(Scalar(0x00))
|
||||
// mir::Constant
|
||||
// + span: $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
// + literal: Const { ty: Dst, val: Value(Scalar(0x00)) }
|
||||
// + span: $DIR/simplify-arm-identity.rs:21:30: 21:31
|
||||
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
|
||||
discriminant(_2) = 0; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32
|
||||
goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6
|
||||
}
|
||||
|
||||
|
@ -22,58 +22,44 @@
|
||||
bb0: {
|
||||
- StorageLive(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
- StorageLive(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
|
||||
- _2 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
|
||||
- StorageLive(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
|
||||
- (_1.0: ()) = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
+ StorageLive(_1); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
|
||||
+ _1 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
|
||||
// ty::Const
|
||||
- // + ty: ()
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- StorageLive(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
|
||||
- _3 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
|
||||
- (_1.1: ()) = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
- // ty::Const
|
||||
- // + ty: ()
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- _1 = const ((), ()); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
- // ty::Const
|
||||
- // + ty: ((), ())
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
|
||||
- // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- StorageDead(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
|
||||
- StorageDead(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
|
||||
- StorageDead(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29
|
||||
- StorageLive(_4); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
|
||||
- StorageLive(_5); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- StorageLive(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
|
||||
- _6 = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
|
||||
- // ty::Const
|
||||
- // + ty: ()
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- StorageLive(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
|
||||
- _7 = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
|
||||
- (_5.0: ()) = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- // ty::Const
|
||||
- // + ty: ()
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- _5 = const ((), ()); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- // ty::Const
|
||||
- // + ty: ((), ())
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- (_5.1: ()) = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- // ty::Const
|
||||
- // + ty: ()
|
||||
- // + val: Value(Scalar(<ZST>))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
|
||||
- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
- 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 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
|
||||
@ -98,16 +84,16 @@
|
||||
- StorageLive(_9); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
|
||||
- StorageLive(_10); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
|
||||
- StorageLive(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
|
||||
- _11 = const Temp { x: 40_u8 }; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
|
||||
- (_11.0: u8) = const 40_u8; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
|
||||
+ 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 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
|
||||
// ty::Const
|
||||
- // + ty: Temp
|
||||
- // + ty: u8
|
||||
- // + val: Value(Scalar(0x28))
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
|
||||
- // + literal: Const { ty: Temp, val: Value(Scalar(0x28)) }
|
||||
- // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:23: 16:25
|
||||
- // + literal: Const { ty: u8, val: Value(Scalar(0x28)) }
|
||||
- _10 = const 40_u8; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
|
||||
- // ty::Const
|
||||
- // + ty: u8
|
||||
|
@ -39,13 +39,7 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const std::option::Option::<std::boxed::Box<()>>::None; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
// ty::Const
|
||||
// + ty: std::option::Option<std::boxed::Box<()>>
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
// + literal: Const { ty: std::option::Option<std::boxed::Box<()>>, val: Value(Scalar(0x00000000)) }
|
||||
discriminant(_0) = 0; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
goto -> bb3; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,7 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const std::option::Option::<std::boxed::Box<()>>::None; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
// ty::Const
|
||||
// + ty: std::option::Option<std::boxed::Box<()>>
|
||||
// + val: Value(Scalar(0x0000000000000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
// + literal: Const { ty: std::option::Option<std::boxed::Box<()>>, val: Value(Scalar(0x0000000000000000)) }
|
||||
discriminant(_0) = 0; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21
|
||||
goto -> bb3; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ fn main() -> () {
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6
|
||||
StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
_2 = Test1::C; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
discriminant(_2) = 2; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
_3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20
|
||||
StorageLive(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24
|
||||
_5 = const "C"; // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24
|
||||
@ -31,7 +31,7 @@ fn main() -> () {
|
||||
StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7
|
||||
StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6
|
||||
StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
_7 = Test2::D; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
discriminant(_7) = 0; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
_8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
|
||||
switchInt(move _8) -> [4_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6
|
||||
StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
_2 = Test1::C; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
discriminant(_2) = 2; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19
|
||||
_3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20
|
||||
- switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20
|
||||
+ switchInt(move _3) -> bb1; // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20
|
||||
@ -66,7 +66,7 @@
|
||||
StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7
|
||||
StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6
|
||||
StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
_7 = Test2::D; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
discriminant(_7) = 0; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19
|
||||
_8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
|
||||
switchInt(move _8) -> [4_isize: bb6, otherwise: bb5]; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17
|
||||
}
|
||||
|
@ -0,0 +1,84 @@
|
||||
- // MIR for `change_loop_body` before ConstProp
|
||||
+ // MIR for `change_loop_body` after ConstProp
|
||||
|
||||
fn change_loop_body() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
|
||||
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
let mut _2: (); // in scope 0 at $DIR/while_let_loops.rs:5:1: 11:2
|
||||
let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
let mut _4: isize; // in scope 0 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
let mut _5: !; // in scope 0 at $DIR/while_let_loops.rs:7:33: 10:6
|
||||
let mut _6: !; // in scope 0 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
scope 1 {
|
||||
debug _x => _1; // in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
||||
StorageLive(_3); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
discriminant(_3) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
- _4 = discriminant(_3); // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ _4 = const 0_isize; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
+ // + val: Value(Scalar(0x00000000))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) }
|
||||
+ switchInt(const 0_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
+ // + val: Value(Scalar(0x00000000))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt(((_3 as Some).0: u32)) -> [0_u32: bb3, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:20: 7:24
|
||||
}
|
||||
|
||||
bb3: {
|
||||
_1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:8:14: 8:15
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:9:9: 9:14
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_3); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
|
||||
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,84 @@
|
||||
- // MIR for `change_loop_body` before ConstProp
|
||||
+ // MIR for `change_loop_body` after ConstProp
|
||||
|
||||
fn change_loop_body() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
|
||||
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
let mut _2: (); // in scope 0 at $DIR/while_let_loops.rs:5:1: 11:2
|
||||
let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
let mut _4: isize; // in scope 0 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
let mut _5: !; // in scope 0 at $DIR/while_let_loops.rs:7:33: 10:6
|
||||
let mut _6: !; // in scope 0 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
scope 1 {
|
||||
debug _x => _1; // in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
||||
StorageLive(_3); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
discriminant(_3) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
- _4 = discriminant(_3); // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ _4 = const 0_isize; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
+ // + val: Value(Scalar(0x0000000000000000))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) }
|
||||
+ switchInt(const 0_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // ty::Const
|
||||
+ // + ty: isize
|
||||
+ // + val: Value(Scalar(0x0000000000000000))
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/while_let_loops.rs:7:15: 7:25
|
||||
+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt(((_3 as Some).0: u32)) -> [0_u32: bb3, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:20: 7:24
|
||||
}
|
||||
|
||||
bb3: {
|
||||
_1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000001))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:8:14: 8:15
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:9:9: 9:14
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_3); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
|
||||
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
// MIR for `change_loop_body` after PreCodegen
|
||||
|
||||
fn change_loop_body() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
|
||||
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
let mut _2: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
scope 1 {
|
||||
debug _x => _1; // in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
discriminant(_2) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
StorageDead(_2); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
|
||||
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
// MIR for `change_loop_body` after PreCodegen
|
||||
|
||||
fn change_loop_body() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/while_let_loops.rs:5:27: 5:27
|
||||
let mut _1: i32; // in scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
let mut _2: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
scope 1 {
|
||||
debug _x => _1; // in scope 1 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
|
||||
_1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// ty::Const
|
||||
// + ty: i32
|
||||
// + val: Value(Scalar(0x00000000))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:6:18: 6:19
|
||||
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
discriminant(_2) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
|
||||
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// ty::Const
|
||||
// + ty: ()
|
||||
// + val: Value(Scalar(<ZST>))
|
||||
// mir::Constant
|
||||
// + span: $DIR/while_let_loops.rs:7:5: 10:6
|
||||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
||||
StorageDead(_2); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
|
||||
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
|
||||
}
|
||||
}
|
15
src/test/mir-opt/while_let_loops.rs
Normal file
15
src/test/mir-opt/while_let_loops.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
|
||||
// EMIT_MIR while_let_loops.change_loop_body.PreCodegen.after.mir
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
||||
pub fn change_loop_body() {
|
||||
let mut _x = 0;
|
||||
while let Some(0u32) = None {
|
||||
_x = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
change_loop_body();
|
||||
}
|
Loading…
Reference in New Issue
Block a user