Rollup merge of #82684 - tmiasko:dest-prop, r=jonas-schievink

Disable destination propagation on all mir-opt-levels

The new `// compile-flags: -Zunsound-mir-opts` are inserted without an extra newline to avoid introducing a large mir-opt diff.
This commit is contained in:
Dylan DPC 2021-03-08 13:13:24 +01:00 committed by GitHub
commit dd7a606804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 260 additions and 147 deletions

View File

@ -127,6 +127,11 @@
impl<'tcx> MirPass<'tcx> for DestinationPropagation { impl<'tcx> MirPass<'tcx> for DestinationPropagation {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// FIXME(#79191, #82678)
if !tcx.sess.opts.debugging_opts.unsound_mir_opts {
return;
}
// Only run at mir-opt-level=3 or higher for now (we don't fix up debuginfo and remove // Only run at mir-opt-level=3 or higher for now (we don't fix up debuginfo and remove
// storage statements at the moment). // storage statements at the moment).
if tcx.sess.mir_opt_level() < 3 { if tcx.sess.mir_opt_level() < 3 {

View File

@ -5,22 +5,26 @@
debug s => _1; // in scope 0 at $DIR/deduplicate_blocks.rs:2:36: 2:37 debug s => _1; // in scope 0 at $DIR/deduplicate_blocks.rs:2:36: 2:37
let mut _0: bool; // return place in scope 0 at $DIR/deduplicate_blocks.rs:2:48: 2:52 let mut _0: bool; // return place in scope 0 at $DIR/deduplicate_blocks.rs:2:48: 2:52
let mut _2: &[u8]; // in scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23 let mut _2: &[u8]; // in scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
let mut _3: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31 let mut _3: &str; // in scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12
let mut _4: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31 let mut _4: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
let mut _5: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37 let mut _5: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
let mut _6: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37 let mut _6: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
let mut _7: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
scope 1 (inlined core::str::<impl str>::as_bytes) { // at $DIR/deduplicate_blocks.rs:3:11: 3:23 scope 1 (inlined core::str::<impl str>::as_bytes) { // at $DIR/deduplicate_blocks.rs:3:11: 3:23
debug self => _7; // in scope 1 at $DIR/deduplicate_blocks.rs:3:11: 3:23 debug self => _3; // in scope 1 at $DIR/deduplicate_blocks.rs:3:11: 3:23
let mut _7: &str; // in scope 1 at $DIR/deduplicate_blocks.rs:3:11: 3:23 let mut _8: &str; // in scope 1 at $DIR/deduplicate_blocks.rs:3:11: 3:23
scope 2 { scope 2 {
} }
} }
bb0: { bb0: {
StorageLive(_2); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23 StorageLive(_2); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
_7 = _1; // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12 StorageLive(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12
- _2 = transmute::<&str, &[u8]>(move _7) -> bb14; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23 _3 = _1; // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12
+ _2 = transmute::<&str, &[u8]>(move _7) -> bb12; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23 StorageLive(_8); // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
_8 = _3; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
- _2 = transmute::<&str, &[u8]>(move _8) -> bb14; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
+ _2 = transmute::<&str, &[u8]>(move _8) -> bb12; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
// mir::Constant // mir::Constant
// + span: $DIR/deduplicate_blocks.rs:3:11: 3:23 // + span: $DIR/deduplicate_blocks.rs:3:11: 3:23
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&str) -> &[u8] {std::intrinsics::transmute::<&str, &[u8]>}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&str) -> &[u8] {std::intrinsics::transmute::<&str, &[u8]>}, val: Value(Scalar(<ZST>)) }
@ -44,9 +48,9 @@
} }
bb5: { bb5: {
_3 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31 _4 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
_4 = Ge(move _3, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31 _5 = Ge(move _4, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
switchInt(move _4) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31 switchInt(move _5) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
} }
bb6: { bb6: {
@ -93,9 +97,11 @@
- bb14: { - bb14: {
+ bb12: { + bb12: {
_5 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37 StorageDead(_8); // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
_6 = Ge(move _5, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37 StorageDead(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:22: 3:23
switchInt(move _6) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37 _6 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
_7 = Ge(move _6, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
switchInt(move _7) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
} }
} }

View File

@ -1,5 +1,5 @@
//! Tests that assignment in both branches of an `if` are eliminated. //! Tests that assignment in both branches of an `if` are eliminated.
// compile-flags: -Zunsound-mir-opts
fn val() -> i32 { fn val() -> i32 {
1 1
} }

View File

@ -1,6 +1,6 @@
// Check that DestinationPropagation does not propagate an assignment to a function argument // Check that DestinationPropagation does not propagate an assignment to a function argument
// (doing so can break usages of the original argument value) // (doing so can break usages of the original argument value)
// compile-flags: -Zunsound-mir-opts
fn dummy(x: u8) -> u8 { fn dummy(x: u8) -> u8 {
x x
} }

View File

@ -1,5 +1,5 @@
//! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code. //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code.
// compile-flags: -Zunsound-mir-opts
fn val() -> i32 { fn val() -> i32 {
1 1
} }

View File

@ -1,5 +1,5 @@
//! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too. //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
// compile-flags: -Zunsound-mir-opts
// EMIT_MIR simple.nrvo.DestinationPropagation.diff // EMIT_MIR simple.nrvo.DestinationPropagation.diff
fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] { fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {
let mut buf = [0; 1024]; let mut buf = [0; 1024];

View File

@ -1,5 +1,5 @@
//! Tests that projections through unions cancel `DestinationPropagation`. //! Tests that projections through unions cancel `DestinationPropagation`.
// compile-flags: -Zunsound-mir-opts
fn val() -> u32 { fn val() -> u32 {
1 1
} }

View File

@ -17,7 +17,8 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
debug _q => _9; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 debug _q => _9; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
let mut _10: T; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 let mut _10: i32; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
let mut _11: T; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
} }
} }
@ -39,10 +40,13 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
(_7.0: i32) = 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
StorageLive(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 StorageLive(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
_9 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 _9 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
(_0.0: i32) = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageLive(_10); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 StorageLive(_10); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
_10 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 _10 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
(_0.1: T) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 StorageLive(_11); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
_11 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
(_0.0: i32) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
(_0.1: T) = move _11; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageDead(_11); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageDead(_10); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9 StorageDead(_10); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageDead(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 StorageDead(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageDead(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 StorageDead(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9

View File

@ -5,18 +5,20 @@
let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:21:12: 21:12 let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:21:12: 21:12
let _1: (!, !); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 let _1: (!, !); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _2: fn() -> ! {sleep}; // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _2: fn() -> ! {sleep}; // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _7: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _9: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _8: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _10: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
+ scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { // at $DIR/inline-diverging.rs:22:5: 22:22 + scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { // at $DIR/inline-diverging.rs:22:5: 22:22
+ debug f => _2; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + debug f => _2; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ let _3: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + let _3: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _4: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _4: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _5: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _6: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _6: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _7: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ let mut _8: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ scope 2 { + scope 2 {
+ debug a => _3; // in scope 2 at $DIR/inline-diverging.rs:22:5: 22:22 + debug a => _3; // in scope 2 at $DIR/inline-diverging.rs:22:5: 22:22
+ let _5: !; // in scope 2 at $DIR/inline-diverging.rs:22:5: 22:22
+ scope 3 { + scope 3 {
+ debug b => _6; // in scope 3 at $DIR/inline-diverging.rs:22:5: 22:22 + debug b => _5; // in scope 3 at $DIR/inline-diverging.rs:22:5: 22:22
+ } + }
+ scope 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:22:5: 22:22 + scope 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:22:5: 22:22
+ scope 7 (inlined sleep) { // at $DIR/inline-diverging.rs:22:5: 22:22 + scope 7 (inlined sleep) { // at $DIR/inline-diverging.rs:22:5: 22:22
@ -40,12 +42,11 @@
- // mir::Constant - // mir::Constant
// + span: $DIR/inline-diverging.rs:22:16: 22:21 // + span: $DIR/inline-diverging.rs:22:16: 22:21
// + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar(<ZST>)) }
+ StorageLive(_6); // scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
+ StorageLive(_3); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + StorageLive(_3); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ StorageLive(_4); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + StorageLive(_4); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ StorageLive(_7); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + StorageLive(_9); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ _7 = const (); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 + _9 = const (); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
+ goto -> bb1; // scope 4 at $DIR/inline-diverging.rs:22:5: 22:22 + goto -> bb1; // scope 4 at $DIR/inline-diverging.rs:22:5: 22:22
} }

View File

@ -24,9 +24,12 @@
+ } + }
+ } + }
+ scope 6 (inlined g::{closure#0}) { // at $DIR/inline-generator.rs:9:14: 9:46 + scope 6 (inlined g::{closure#0}) { // at $DIR/inline-generator.rs:9:14: 9:46
+ debug a => _8; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + debug a => _11; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ let mut _8: bool; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + let mut _8: i32; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ let mut _9: u32; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + let mut _9: bool; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ let mut _10: bool; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ let _11: bool; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ let mut _12: u32; // in scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ } + }
bb0: { bb0: {
@ -65,16 +68,18 @@
- // + literal: Const { ty: for<'r> fn(std::pin::Pin<&'r mut impl std::ops::Generator<bool>>, bool) -> std::ops::GeneratorState<<impl std::ops::Generator<bool> as std::ops::Generator<bool>>::Yield, <impl std::ops::Generator<bool> as std::ops::Generator<bool>>::Return> {<impl std::ops::Generator<bool> as std::ops::Generator<bool>>::resume}, val: Value(Scalar(<ZST>)) } - // + literal: Const { ty: for<'r> fn(std::pin::Pin<&'r mut impl std::ops::Generator<bool>>, bool) -> std::ops::GeneratorState<<impl std::ops::Generator<bool> as std::ops::Generator<bool>>::Yield, <impl std::ops::Generator<bool> as std::ops::Generator<bool>>::Return> {<impl std::ops::Generator<bool> as std::ops::Generator<bool>>::resume}, val: Value(Scalar(<ZST>)) }
+ StorageLive(_7); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_7); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ _7 = const false; // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + _7 = const false; // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageLive(_8); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_10); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageLive(_9); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_11); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ _9 = discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_12); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ switchInt(move _9) -> [0_u32: bb3, 1_u32: bb8, 3_u32: bb7, otherwise: bb9]; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + _12 = discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ switchInt(move _12) -> [0_u32: bb3, 1_u32: bb8, 3_u32: bb7, otherwise: bb9]; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
} }
- bb3: { - bb3: {
+ bb1: { + bb1: {
+ StorageDead(_9); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageDead(_12); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageDead(_8); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageDead(_11); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageDead(_10); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageDead(_7); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageDead(_7); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46
StorageDead(_2); // scope 0 at $DIR/inline-generator.rs:9:45: 9:46 StorageDead(_2); // scope 0 at $DIR/inline-generator.rs:9:45: 9:46
StorageDead(_4); // scope 0 at $DIR/inline-generator.rs:9:46: 9:47 StorageDead(_4); // scope 0 at $DIR/inline-generator.rs:9:46: 9:47
@ -89,28 +94,36 @@
+ } + }
+ +
+ bb3: { + bb3: {
+ _8 = move _7; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + _11 = move _7; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ switchInt(move _8) -> [false: bb5, otherwise: bb4]; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_8); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageLive(_9); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ _9 = _11; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ switchInt(move _9) -> [false: bb5, otherwise: bb4]; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ } + }
+ +
+ bb4: { + bb4: {
+ ((_1 as Yielded).0: i32) = const 7_i32; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + _8 = const 7_i32; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ goto -> bb6; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + goto -> bb6; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ } + }
+ +
+ bb5: { + bb5: {
+ ((_1 as Yielded).0: i32) = const 13_i32; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + _8 = const 13_i32; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ goto -> bb6; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + goto -> bb6; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ } + }
+ +
+ bb6: { + bb6: {
+ StorageDead(_9); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ ((_1 as Yielded).0: i32) = move _8; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ discriminant(_1) = 0; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + discriminant(_1) = 0; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))) = 3; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))) = 3; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:11: 15:39 + goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:11: 15:39
+ } + }
+ +
+ bb7: { + bb7: {
+ ((_1 as Complete).0: bool) = move _7; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_8); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ _10 = move _7; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ StorageDead(_8); // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ ((_1 as Complete).0: bool) = move _10; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ discriminant(_1) = 1; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + discriminant(_1) = 1; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))) = 1; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 + discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41 {bool, i32}]))) = 1; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46
+ goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:41: 15:41 + goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:41: 15:41

View File

@ -6,25 +6,32 @@
let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14 let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15 let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
let mut _5: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _5: i32; // in scope 0 at $DIR/issue-73223.rs:7:22: 7:27
let mut _6: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _6: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _7: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _7: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _8: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _8: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _9: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _11: 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: bool; // 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 mut _13: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _13: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _15: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _19: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 1 { scope 1 {
debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
scope 3 { scope 3 {
debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
let _9: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _10: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _20: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 4 { scope 4 {
debug left_val => _11; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug left_val => _9; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug right_val => _12; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _10; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _10: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _14: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 5 { scope 5 {
debug kind => _10; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug kind => _14; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
} }
} }
} }
@ -43,36 +50,57 @@
_1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21 _1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21 StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
((_4 as Some).0: i32) = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27 StorageLive(_4); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_5); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_5 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
((_4 as Some).0: i32) = move _5; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28 discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
(_5.0: &i32) = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_5); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
_6 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_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 = &_1; // 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
_20 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const // ty::Const
// + ty: &i32 // + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant // mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) } // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
(_5.1: &i32) = move _6; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = (_5.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_12 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_7); // 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
StorageLive(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_7); // 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(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_9 = (*_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _9 = (_6.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_8 = Eq(move _9, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = (_6.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_7 = Not(move _8); // 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
StorageDead(_8); // 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
switchInt(move _7) -> [false: bb2, otherwise: bb1]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_13 = (*_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_12 = Eq(move _13, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = Not(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
switchInt(move _11) -> [false: bb2, otherwise: bb1]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
} }
bb1: { bb1: {
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_10) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_13) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _11, move _12, move _13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _16 = _9; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = _16; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_17); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant // mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option<std::fmt::Arguments<'t0>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option<std::fmt::Arguments<'t0>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(Scalar(<ZST>)) }
@ -85,8 +113,12 @@
} }
bb2: { bb2: {
StorageDead(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_6); // 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 _0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
StorageDead(_4); // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2 StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2 return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
} }

View File

@ -6,25 +6,32 @@
let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14 let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15 let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
let mut _5: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _5: i32; // in scope 0 at $DIR/issue-73223.rs:7:22: 7:27
let mut _6: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _6: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _7: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _7: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _8: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _8: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _9: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _11: 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: bool; // 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 mut _13: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _13: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _15: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _19: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 1 { scope 1 {
debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
scope 3 { scope 3 {
debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
let _9: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _10: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _20: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 4 { scope 4 {
debug left_val => _11; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug left_val => _9; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug right_val => _12; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _10; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _10: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _14: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 5 { scope 5 {
debug kind => _10; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug kind => _14; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
} }
} }
} }
@ -43,36 +50,57 @@
_1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21 _1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21 StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
((_4 as Some).0: i32) = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27 StorageLive(_4); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_5); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_5 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
((_4 as Some).0: i32) = move _5; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28 discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
(_5.0: &i32) = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_5); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
_6 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_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 = &_1; // 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
_20 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const // ty::Const
// + ty: &i32 // + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant // mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) } // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
(_5.1: &i32) = move _6; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = (_5.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_12 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_7); // 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
StorageLive(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_7); // 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(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_9 = (*_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _9 = (_6.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_8 = Eq(move _9, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = (_6.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_7 = Not(move _8); // 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
StorageDead(_8); // 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
switchInt(move _7) -> [false: bb2, otherwise: bb1]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_13 = (*_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_12 = Eq(move _13, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = Not(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
switchInt(move _11) -> [false: bb2, otherwise: bb1]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
} }
bb1: { bb1: {
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_10) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_13) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _11, move _12, move _13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _16 = _9; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = _16; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_17); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant // mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option<std::fmt::Arguments<'t0>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option<std::fmt::Arguments<'t0>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(Scalar(<ZST>)) }
@ -85,8 +113,12 @@
} }
bb2: { bb2: {
StorageDead(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_6); // 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 _0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
StorageDead(_4); // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2 StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2 return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
} }

View File

@ -3,60 +3,67 @@
fn num_to_digit(_1: char) -> u32 { fn num_to_digit(_1: char) -> u32 {
debug num => _1; // in scope 0 at $DIR/issue-59352.rs:12:21: 12:24 debug num => _1; // in scope 0 at $DIR/issue-59352.rs:12:21: 12:24
let mut _0: u32; // return place in scope 0 at $DIR/issue-59352.rs:12:35: 12:38 let mut _0: u32; // return place in scope 0 at $DIR/issue-59352.rs:12:35: 12:38
let mut _2: std::option::Option<u32>; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:41 let mut _2: char; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:11
let mut _3: char; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:29 let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:41
let mut _4: u32; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23 let mut _4: char; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:29
let mut _9: isize; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23 let mut _5: u32; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23
let mut _11: isize; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23
scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue-59352.rs:14:8: 14:23 scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue-59352.rs:14:8: 14:23
debug self => _7; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23 debug self => _2; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23
debug radix => _4; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23 debug radix => _5; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23
let mut _5: &std::option::Option<u32>; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23 let mut _6: &std::option::Option<u32>; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23
let _6: std::option::Option<u32>; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23 let _7: std::option::Option<u32>; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23
let mut _7: char; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23 let mut _8: char; // in scope 1 at $DIR/issue-59352.rs:14:8: 14:23
scope 2 (inlined Option::<u32>::is_some) { // at $DIR/issue-59352.rs:14:8: 14:23 scope 2 (inlined Option::<u32>::is_some) { // at $DIR/issue-59352.rs:14:8: 14:23
debug self => _5; // in scope 2 at $DIR/issue-59352.rs:14:8: 14:23 debug self => _6; // in scope 2 at $DIR/issue-59352.rs:14:8: 14:23
let mut _9: isize; // in scope 2 at $DIR/issue-59352.rs:14:8: 14:23
} }
} }
scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue-59352.rs:14:26: 14:50 scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue-59352.rs:14:26: 14:50
debug self => _2; // in scope 3 at $DIR/issue-59352.rs:14:26: 14:50 debug self => _3; // in scope 3 at $DIR/issue-59352.rs:14:26: 14:50
let mut _8: isize; // in scope 3 at $DIR/issue-59352.rs:14:26: 14:50 let mut _10: isize; // in scope 3 at $DIR/issue-59352.rs:14:26: 14:50
scope 4 { scope 4 {
debug val => _0; // in scope 4 at $DIR/issue-59352.rs:14:26: 14:50 debug val => _0; // in scope 4 at $DIR/issue-59352.rs:14:26: 14:50
} }
} }
bb0: { bb0: {
_7 = _1; // scope 0 at $DIR/issue-59352.rs:14:8: 14:11 StorageLive(_2); // scope 0 at $DIR/issue-59352.rs:14:8: 14:11
StorageLive(_4); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 _2 = _1; // scope 0 at $DIR/issue-59352.rs:14:8: 14:11
_4 = const 8_u32; // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 StorageLive(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
StorageLive(_5); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 _5 = const 8_u32; // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
StorageLive(_6); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 StorageLive(_6); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
_6 = char::methods::<impl char>::to_digit(move _7, const 8_u32) -> bb5; // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 StorageLive(_7); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
StorageLive(_8); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
_8 = _2; // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
_7 = char::methods::<impl char>::to_digit(move _8, const 8_u32) -> bb5; // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
// mir::Constant // mir::Constant
// + span: $DIR/issue-59352.rs:14:8: 14:23 // + span: $DIR/issue-59352.rs:14:8: 14:23
// + literal: Const { ty: fn(char, u32) -> std::option::Option<u32> {std::char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: fn(char, u32) -> std::option::Option<u32> {std::char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) }
} }
bb1: { bb1: {
StorageLive(_2); // scope 0 at $DIR/issue-59352.rs:14:26: 14:41 StorageDead(_11); // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
StorageLive(_3); // scope 0 at $DIR/issue-59352.rs:14:26: 14:29 StorageLive(_3); // scope 0 at $DIR/issue-59352.rs:14:26: 14:41
_3 = _1; // scope 0 at $DIR/issue-59352.rs:14:26: 14:29 StorageLive(_4); // scope 0 at $DIR/issue-59352.rs:14:26: 14:29
_2 = char::methods::<impl char>::to_digit(move _3, const 8_u32) -> bb3; // scope 0 at $DIR/issue-59352.rs:14:26: 14:41 _4 = _1; // scope 0 at $DIR/issue-59352.rs:14:26: 14:29
_3 = char::methods::<impl char>::to_digit(move _4, const 8_u32) -> bb3; // scope 0 at $DIR/issue-59352.rs:14:26: 14:41
// mir::Constant // mir::Constant
// + span: $DIR/issue-59352.rs:14:30: 14:38 // + span: $DIR/issue-59352.rs:14:30: 14:38
// + literal: Const { ty: fn(char, u32) -> std::option::Option<u32> {std::char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) } // + literal: Const { ty: fn(char, u32) -> std::option::Option<u32> {std::char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) }
} }
bb2: { bb2: {
StorageDead(_11); // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
_0 = const 0_u32; // scope 0 at $DIR/issue-59352.rs:14:60: 14:61 _0 = const 0_u32; // scope 0 at $DIR/issue-59352.rs:14:60: 14:61
goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63 goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
} }
bb3: { bb3: {
StorageDead(_3); // scope 0 at $DIR/issue-59352.rs:14:40: 14:41 StorageDead(_4); // scope 0 at $DIR/issue-59352.rs:14:40: 14:41
StorageLive(_8); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50 StorageLive(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50
_8 = discriminant(_2); // scope 3 at $DIR/issue-59352.rs:14:26: 14:50 _10 = discriminant(_3); // scope 3 at $DIR/issue-59352.rs:14:26: 14:50
switchInt(move _8) -> [0_isize: bb6, 1_isize: bb8, otherwise: bb7]; // scope 3 at $DIR/issue-59352.rs:14:26: 14:50 switchInt(move _10) -> [0_isize: bb6, 1_isize: bb8, otherwise: bb7]; // scope 3 at $DIR/issue-59352.rs:14:26: 14:50
} }
bb4: { bb4: {
@ -64,12 +71,18 @@ fn num_to_digit(_1: char) -> u32 {
} }
bb5: { bb5: {
_5 = &_6; // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 _6 = &_7; // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
_9 = discriminant((*_5)); // scope 2 at $DIR/issue-59352.rs:14:8: 14:23 StorageDead(_8); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
StorageDead(_5); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 StorageLive(_9); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
_9 = discriminant((*_6)); // scope 2 at $DIR/issue-59352.rs:14:8: 14:23
StorageLive(_11); // scope 2 at $DIR/issue-59352.rs:14:8: 14:23
_11 = move _9; // scope 2 at $DIR/issue-59352.rs:14:8: 14:23
StorageDead(_9); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
StorageDead(_6); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23 StorageDead(_6); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
StorageDead(_4); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 StorageDead(_7); // scope 1 at $DIR/issue-59352.rs:14:8: 14:23
switchInt(move _9) -> [1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63 StorageDead(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
StorageDead(_2); // scope 0 at $DIR/issue-59352.rs:14:22: 14:23
switchInt(move _11) -> [1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
} }
bb6: { bb6: {
@ -90,9 +103,9 @@ fn num_to_digit(_1: char) -> u32 {
} }
bb8: { bb8: {
_0 = move ((_2 as Some).0: u32); // scope 3 at $DIR/issue-59352.rs:14:26: 14:50 _0 = move ((_3 as Some).0: u32); // scope 3 at $DIR/issue-59352.rs:14:26: 14:50
StorageDead(_8); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50 StorageDead(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50
StorageDead(_2); // scope 0 at $DIR/issue-59352.rs:14:49: 14:50 StorageDead(_3); // scope 0 at $DIR/issue-59352.rs:14:49: 14:50
goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63 goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
} }
} }

View File

@ -2,9 +2,9 @@
fn f_u64() -> () { fn f_u64() -> () {
let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:34:16: 34:16 let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:34:16: 34:16
let mut _1: u64; // in scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21
scope 1 (inlined f_dispatch::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21 scope 1 (inlined f_dispatch::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21
debug t => _1; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 debug t => _1; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
let mut _1: u64; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
let _2: (); // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 let _2: (); // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
let mut _3: u64; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 let mut _3: u64; // in scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
scope 2 (inlined std::mem::size_of::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21 scope 2 (inlined std::mem::size_of::<u64>) { // at $DIR/lower_intrinsics.rs:35:5: 35:21
@ -12,6 +12,7 @@ fn f_u64() -> () {
} }
bb0: { bb0: {
StorageLive(_1); // scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21
_1 = const 0_u64; // scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21 _1 = const 0_u64; // scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21
StorageLive(_2); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 StorageLive(_2); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
StorageLive(_3); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 StorageLive(_3); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
@ -25,6 +26,7 @@ fn f_u64() -> () {
bb1: { bb1: {
StorageDead(_3); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 StorageDead(_3); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
StorageDead(_2); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21 StorageDead(_2); // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
StorageDead(_1); // scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21
_0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:34:16: 36:2 _0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:34:16: 36:2
return; // scope 0 at $DIR/lower_intrinsics.rs:36:2: 36:2 return; // scope 0 at $DIR/lower_intrinsics.rs:36:2: 36:2
} }

View File

@ -17,8 +17,13 @@
StorageLive(_1); // scope 0 at $DIR/simplify-locals.rs:14:9: 14:14 StorageLive(_1); // scope 0 at $DIR/simplify-locals.rs:14:9: 14:14
_1 = [const 0_u8; 10]; // scope 0 at $DIR/simplify-locals.rs:14:17: 14:26 _1 = [const 0_u8; 10]; // scope 0 at $DIR/simplify-locals.rs:14:17: 14:26
- StorageLive(_2); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26 - StorageLive(_2); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- _3 = &_1; // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26 - StorageLive(_3); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- StorageLive(_4); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- _4 = &_1; // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- _3 = _4; // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- _2 = move _3 as &[u8] (Pointer(Unsize)); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26 - _2 = move _3 as &[u8] (Pointer(Unsize)); // scope 1 at $DIR/simplify-locals.rs:16:20: 16:26
- StorageDead(_3); // scope 1 at $DIR/simplify-locals.rs:16:25: 16:26
- StorageDead(_4); // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
- StorageDead(_2); // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27 - StorageDead(_2); // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
_0 = const (); // scope 0 at $DIR/simplify-locals.rs:13:8: 17:2 _0 = const (); // scope 0 at $DIR/simplify-locals.rs:13:8: 17:2
StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:17:1: 17:2 StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:17:1: 17:2