diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-02-27 16:09:52 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-02-27 19:05:56 +0100 |
| commit | e77e4fcf898ca4b2aa2041d2cbac200ed0f11b5b (patch) | |
| tree | 9994c3a36e798d935142a9dbee2c84c872be4b0c /src/test/mir-opt/inline | |
| parent | 6cbc6c35e4b0c948114619a1c883a75b731d32c5 (diff) | |
Only create a single expansion for each inline integration.
Diffstat (limited to 'src/test/mir-opt/inline')
25 files changed, 196 insertions, 196 deletions
diff --git a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir index 815d02c73d1..b2745a17e97 100644 --- a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir @@ -9,10 +9,10 @@ fn bar() -> bool { scope 1 { debug f => _1; // in scope 1 at $DIR/inline-any-operand.rs:11:9: 11:10 scope 2 (inlined foo) { // at $DIR/inline-any-operand.rs:12:5: 12:13 - debug x => _3; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - debug y => _4; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - let mut _5: i32; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - let mut _6: i32; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 + debug x => _3; // in scope 2 at $DIR/inline-any-operand.rs:16:8: 16:9 + debug y => _4; // in scope 2 at $DIR/inline-any-operand.rs:16:16: 16:17 + let mut _5: i32; // in scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6 + let mut _6: i32; // in scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11 } } @@ -28,13 +28,13 @@ fn bar() -> bool { _3 = const 1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 StorageLive(_4); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 _4 = const -1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 - StorageLive(_5); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - _5 = _3; // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - StorageLive(_6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - _6 = _4; // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - _0 = Eq(move _5, move _6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - StorageDead(_6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 - StorageDead(_5); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13 + StorageLive(_5); // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6 + _5 = _3; // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6 + StorageLive(_6); // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11 + _6 = _4; // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11 + _0 = Eq(move _5, move _6); // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11 + StorageDead(_6); // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11 + StorageDead(_5); // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11 StorageDead(_4); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 StorageDead(_3); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 StorageDead(_2); // scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13 diff --git a/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir index d312369d2af..93a63c84783 100644 --- a/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir @@ -14,8 +14,8 @@ fn foo(_1: T, _2: i32) -> i32 { scope 1 { debug x => _3; // in scope 1 at $DIR/inline-closure.rs:11:9: 11:10 scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure.rs:12:5: 12:12 - debug _t => _8; // in scope 2 at $DIR/inline-closure.rs:12:5: 12:12 - debug _q => _9; // in scope 2 at $DIR/inline-closure.rs:12:5: 12:12 + debug _t => _8; // in scope 2 at $DIR/inline-closure.rs:11:14: 11:16 + debug _q => _9; // in scope 2 at $DIR/inline-closure.rs:11:18: 11:20 } } @@ -34,7 +34,7 @@ fn foo(_1: T, _2: i32) -> i32 { _8 = move (_5.0: i32); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 StorageLive(_9); // 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:12:5: 12:12 + _0 = _8; // scope 2 at $DIR/inline-closure.rs:11:22: 11:24 StorageDead(_9); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 StorageDead(_8); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 StorageDead(_7); // scope 1 at $DIR/inline-closure.rs:12:11: 12:12 diff --git a/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir index 4bda9ae383c..3436370253f 100644 --- a/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir @@ -14,11 +14,11 @@ fn foo(_1: T, _2: &i32) -> i32 { scope 1 { debug x => _3; // in scope 1 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10 scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - debug r => _8; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - debug _s => _9; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - let _10: &i32; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + debug r => _8; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:12:14: 12:15 + debug _s => _9; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:12:23: 12:25 + let _10: &i32; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:13:13: 13:21 scope 3 { - debug variable => _10; // in scope 3 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + debug variable => _10; // in scope 3 at $DIR/inline-closure-borrows-arg.rs:13:13: 13:21 } } } @@ -38,10 +38,10 @@ fn foo(_1: T, _2: &i32) -> i32 { _8 = move (_5.0: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 StorageLive(_9); // 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 - StorageLive(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - _10 = _8; // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - _0 = (*_10); // scope 3 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - StorageDead(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + StorageLive(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:13:13: 13:21 + _10 = _8; // scope 2 at $DIR/inline-closure-borrows-arg.rs:13:24: 13:27 + _0 = (*_10); // scope 3 at $DIR/inline-closure-borrows-arg.rs:14:9: 14:18 + StorageDead(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:15:5: 15:6 StorageDead(_9); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 StorageDead(_8); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 StorageDead(_7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 diff --git a/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir index a7c2c93aad2..cb382859d51 100644 --- a/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir @@ -14,11 +14,11 @@ fn foo(_1: T, _2: i32) -> (i32, T) { scope 1 { debug x => _3; // in scope 1 at $DIR/inline-closure-captures.rs:11:9: 11:10 scope 2 (inlined foo::<T>::{closure#0}) { // 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 t => (*((*_6).1: &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 + debug _q => _9; // in scope 2 at $DIR/inline-closure-captures.rs:11:14: 11:16 + debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:10:23: 10:24 + debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:10:17: 10:18 + let mut _10: i32; // in scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 + let mut _11: T; // in scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 } } @@ -40,14 +40,14 @@ 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 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 - StorageLive(_10); // 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 - 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 + StorageLive(_10); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 + _10 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 + StorageLive(_11); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 + _11 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 + (_0.0: i32) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 + (_0.1: T) = move _11; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 + StorageDead(_11); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 + StorageDead(_10); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 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(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 diff --git a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff index 1b53c827885..b6615739a21 100644 --- a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff @@ -10,11 +10,11 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/inline-cycle.rs:14:5: 14:24 - _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline-cycle.rs:14:5: 14:24 -+ _1 = <A<C> as Call>::call() -> bb1; // scope 1 at $DIR/inline-cycle.rs:14:5: 14:24 ++ _1 = <A<C> as Call>::call() -> bb1; // scope 1 at $DIR/inline-cycle.rs:43:9: 43:23 // mir::Constant - // + span: $DIR/inline-cycle.rs:14:5: 14:22 - // + literal: Const { ty: fn() {<C as Call>::call}, val: Value(Scalar(<ZST>)) } -+ // + span: $DIR/inline-cycle.rs:14:5: 14:24 ++ // + span: $DIR/inline-cycle.rs:43:9: 43:21 + // + literal: Const { ty: fn() {<A<C> as Call>::call}, val: Value(Scalar(<ZST>)) } } diff --git a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff index aaf65c5d0a5..4e461562004 100644 --- a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff @@ -5,12 +5,12 @@ let mut _0: (); // return place in scope 0 at $DIR/inline-cycle.rs:48:10: 48:10 let _1: (); // in scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 + let mut _2: fn() {f}; // in scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 -+ let mut _5: (); // in scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 ++ let mut _5: (); // in scope 0 at $DIR/inline-cycle.rs:54:5: 54:8 + scope 1 (inlined call::<fn() {f}>) { // at $DIR/inline-cycle.rs:49:5: 49:12 -+ debug f => _2; // in scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ let _3: (); // in scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ let mut _4: fn() {f}; // in scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ scope 2 (inlined <fn() {f} as FnOnce<()>>::call_once - shim(fn() {f})) { // at $DIR/inline-cycle.rs:49:5: 49:12 ++ debug f => _2; // in scope 1 at $DIR/inline-cycle.rs:53:22: 53:23 ++ let _3: (); // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ let mut _4: fn() {f}; // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 ++ scope 2 (inlined <fn() {f} as FnOnce<()>>::call_once - shim(fn() {f})) { // at $DIR/inline-cycle.rs:54:5: 54:8 + } + } @@ -25,18 +25,18 @@ - // mir::Constant // + span: $DIR/inline-cycle.rs:49:10: 49:11 // + literal: Const { ty: fn() {f}, val: Value(Scalar(<ZST>)) } -+ StorageLive(_3); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ StorageLive(_4); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ _4 = move _2; // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ StorageLive(_5); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ _5 = const (); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ _3 = move _4() -> bb1; // scope 2 at $DIR/inline-cycle.rs:49:5: 49:12 ++ StorageLive(_3); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ StorageLive(_4); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 ++ _4 = move _2; // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6 ++ StorageLive(_5); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ _5 = const (); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ _3 = move _4() -> bb1; // scope 2 at $SRC_DIR/core/src/ops/function.rs:LL:COL } bb1: { -+ StorageDead(_5); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ StorageDead(_4); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 -+ StorageDead(_3); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12 ++ StorageDead(_5); // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8 ++ StorageDead(_4); // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8 ++ StorageDead(_3); // scope 1 at $DIR/inline-cycle.rs:54:8: 54:9 + StorageDead(_2); // scope 0 at $DIR/inline-cycle.rs:49:5: 49:12 StorageDead(_1); // scope 0 at $DIR/inline-cycle.rs:49:12: 49:13 _0 = const (); // scope 0 at $DIR/inline-cycle.rs:48:10: 50:2 diff --git a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff index 9709f273779..fddf7e6e1f0 100644 --- a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff @@ -5,18 +5,18 @@ let mut _0: (); // return place in scope 0 at $DIR/inline-cycle-generic.rs:8:11: 8:11 let _1: (); // in scope 0 at $DIR/inline-cycle-generic.rs:9:5: 9:24 + scope 1 (inlined <C as Call>::call) { // at $DIR/inline-cycle-generic.rs:9:5: 9:24 -+ scope 2 (inlined <B<A> as Call>::call) { // at $DIR/inline-cycle-generic.rs:9:5: 9:24 ++ scope 2 (inlined <B<A> as Call>::call) { // at $DIR/inline-cycle-generic.rs:38:9: 38:31 + } + } bb0: { StorageLive(_1); // scope 0 at $DIR/inline-cycle-generic.rs:9:5: 9:24 - _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline-cycle-generic.rs:9:5: 9:24 -+ _1 = <A as Call>::call() -> bb1; // scope 2 at $DIR/inline-cycle-generic.rs:9:5: 9:24 ++ _1 = <A as Call>::call() -> bb1; // scope 2 at $DIR/inline-cycle-generic.rs:31:9: 31:28 // mir::Constant - // + span: $DIR/inline-cycle-generic.rs:9:5: 9:22 - // + literal: Const { ty: fn() {<C as Call>::call}, val: Value(Scalar(<ZST>)) } -+ // + span: $DIR/inline-cycle-generic.rs:9:5: 9:24 ++ // + span: $DIR/inline-cycle-generic.rs:31:9: 31:26 + // + literal: Const { ty: fn() {<A as Call>::call}, val: Value(Scalar(<ZST>)) } } diff --git a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff index 6e36dc06a20..5c42c7d2a57 100644 --- a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff @@ -20,7 +20,7 @@ + } + + bb1: { -+ goto -> bb1; // scope 1 at $DIR/inline-diverging.rs:8:5: 8:12 ++ goto -> bb1; // scope 1 at $DIR/inline-diverging.rs:39:5: 39:12 } } diff --git a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff index d4f078e2a8a..3b9d5e727b8 100644 --- a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff @@ -35,14 +35,14 @@ StorageLive(_6); // scope 0 at $DIR/inline-diverging.rs:16:9: 16:16 - panic(); // scope 0 at $DIR/inline-diverging.rs:16:9: 16:16 + StorageLive(_7); // scope 0 at $DIR/inline-diverging.rs:16:9: 16:16 -+ begin_panic::<&str>(const "explicit panic"); // scope 1 at $DIR/inline-diverging.rs:16:9: 16:16 ++ begin_panic::<&str>(const "explicit panic"); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL // mir::Constant - // + span: $DIR/inline-diverging.rs:16:9: 16:14 - // + literal: Const { ty: fn() -> ! {panic}, val: Value(Scalar(<ZST>)) } -+ // + span: $DIR/inline-diverging.rs:16:9: 16:16 ++ // + span: $SRC_DIR/std/src/panic.rs:LL:COL + // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(Scalar(<ZST>)) } + // mir::Constant -+ // + span: $DIR/inline-diverging.rs:16:9: 16:16 ++ // + span: $SRC_DIR/std/src/panic.rs:LL:COL + // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [16383], len: Size { raw: 14 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) } } } diff --git a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff index f810beeeee3..bea33073366 100644 --- a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff +++ b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff @@ -5,28 +5,28 @@ let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:21:12: 21:12 let _1: (!, !); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 + let mut _2: fn() -> ! {sleep}; // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 -+ let mut _9: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 -+ let mut _10: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22 ++ let mut _9: (); // in scope 0 at $DIR/inline-diverging.rs:27:13: 27:16 ++ let mut _10: (); // in scope 0 at $DIR/inline-diverging.rs:28:13: 28:16 + scope 1 (inlined call_twice::<!, 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 -+ 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 _6: &fn() -> ! {sleep}; // 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 ++ debug f => _2; // in scope 1 at $DIR/inline-diverging.rs:26:36: 26:37 ++ let _3: !; // in scope 1 at $DIR/inline-diverging.rs:27:9: 27:10 ++ let mut _4: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 ++ let mut _6: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:14 ++ let mut _7: !; // in scope 1 at $DIR/inline-diverging.rs:29:6: 29:7 ++ let mut _8: !; // in scope 1 at $DIR/inline-diverging.rs:29:9: 29:10 + scope 2 { -+ 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 ++ debug a => _3; // in scope 2 at $DIR/inline-diverging.rs:27:9: 27:10 ++ let _5: !; // in scope 2 at $DIR/inline-diverging.rs:28:9: 28:10 + scope 3 { -+ debug b => _5; // in scope 3 at $DIR/inline-diverging.rs:22:5: 22:22 ++ debug b => _5; // in scope 3 at $DIR/inline-diverging.rs:28:9: 28:10 + } -+ 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 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:28:13: 28:16 ++ scope 7 (inlined sleep) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL + } + } + } -+ scope 4 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:22:5: 22:22 -+ scope 5 (inlined sleep) { // at $DIR/inline-diverging.rs:22:5: 22:22 ++ scope 4 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:27:13: 27:16 ++ scope 5 (inlined sleep) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL + } + } + } @@ -42,19 +42,19 @@ - // mir::Constant // + span: $DIR/inline-diverging.rs:22:16: 22:21 // + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar(<ZST>)) } -+ 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 -+ _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22 -+ StorageLive(_9); // 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 5 at $DIR/inline-diverging.rs:22:5: 22:22 ++ StorageLive(_3); // scope 1 at $DIR/inline-diverging.rs:27:9: 27:10 ++ StorageLive(_4); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 ++ _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14 ++ StorageLive(_9); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 ++ _9 = const (); // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16 ++ goto -> bb1; // scope 5 at $DIR/inline-diverging.rs:39:5: 39:12 } bb1: { - StorageDead(_1); // scope 0 at $DIR/inline-diverging.rs:22:22: 22:23 - _0 = const (); // scope 0 at $DIR/inline-diverging.rs:21:12: 23:2 - return; // scope 0 at $DIR/inline-diverging.rs:23:2: 23:2 -+ goto -> bb1; // scope 5 at $DIR/inline-diverging.rs:22:5: 22:22 ++ goto -> bb1; // scope 5 at $DIR/inline-diverging.rs:39:5: 39:12 } } diff --git a/src/test/mir-opt/inline/inline_generator.main.Inline.diff b/src/test/mir-opt/inline/inline_generator.main.Inline.diff index 3effe92d314..1d72b34f83b 100644 --- a/src/test/mir-opt/inline/inline_generator.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_generator.main.Inline.diff @@ -14,22 +14,22 @@ + scope 2 (inlined g) { // at $DIR/inline-generator.rs:9:28: 9:31 + } + scope 3 (inlined Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:41]>::new) { // at $DIR/inline-generator.rs:9:14: 9:32 -+ debug pointer => _3; // in scope 3 at $DIR/inline-generator.rs:9:14: 9:32 -+ let mut _5: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]; // in scope 3 at $DIR/inline-generator.rs:9:14: 9:32 ++ debug pointer => _3; // in scope 3 at $SRC_DIR/core/src/pin.rs:LL:COL ++ let mut _5: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]; // in scope 3 at $SRC_DIR/core/src/pin.rs:LL:COL + scope 4 { -+ scope 5 (inlined Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:41]>::new_unchecked) { // at $DIR/inline-generator.rs:9:14: 9:32 -+ debug pointer => _5; // in scope 5 at $DIR/inline-generator.rs:9:14: 9:32 -+ let mut _6: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]; // in scope 5 at $DIR/inline-generator.rs:9:14: 9:32 ++ scope 5 (inlined Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:41]>::new_unchecked) { // at $SRC_DIR/core/src/pin.rs:LL:COL ++ debug pointer => _5; // in scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL ++ let mut _6: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]; // in scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL + } + } + } + scope 6 (inlined g::{closure#0}) { // 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: i32; // 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 ++ debug a => _11; // in scope 6 at $DIR/inline-generator.rs:15:6: 15:7 ++ let mut _8: i32; // in scope 6 at $DIR/inline-generator.rs:15:17: 15:39 ++ let mut _9: bool; // in scope 6 at $DIR/inline-generator.rs:15:20: 15:21 ++ let mut _10: bool; // in scope 6 at $DIR/inline-generator.rs:15:9: 15:9 ++ let _11: bool; // in scope 6 at $DIR/inline-generator.rs:15:6: 15:7 ++ let mut _12: u32; // in scope 6 at $DIR/inline-generator.rs:15:5: 15:41 + } bb0: { @@ -44,7 +44,7 @@ - } - - bb1: { -+ discriminant(_4) = 0; // scope 2 at $DIR/inline-generator.rs:9:28: 9:31 ++ discriminant(_4) = 0; // scope 2 at $DIR/inline-generator.rs:15:5: 15:41 _3 = &mut _4; // scope 0 at $DIR/inline-generator.rs:9:23: 9:31 - _2 = Pin::<&mut impl Generator<bool>>::new(move _3) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:9:14: 9:32 - // mir::Constant @@ -54,13 +54,13 @@ - } - - bb2: { -+ StorageLive(_5); // scope 4 at $DIR/inline-generator.rs:9:14: 9:32 -+ _5 = move _3; // scope 4 at $DIR/inline-generator.rs:9:14: 9:32 -+ StorageLive(_6); // scope 5 at $DIR/inline-generator.rs:9:14: 9:32 -+ _6 = move _5; // scope 5 at $DIR/inline-generator.rs:9:14: 9:32 -+ (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]) = move _6; // scope 5 at $DIR/inline-generator.rs:9:14: 9:32 -+ StorageDead(_6); // scope 5 at $DIR/inline-generator.rs:9:14: 9:32 -+ StorageDead(_5); // scope 4 at $DIR/inline-generator.rs:9:14: 9:32 ++ StorageLive(_5); // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL ++ _5 = move _3; // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL ++ StorageLive(_6); // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL ++ _6 = move _5; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL ++ (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]) = move _6; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL ++ StorageDead(_6); // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL ++ StorageDead(_5); // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL StorageDead(_3); // scope 0 at $DIR/inline-generator.rs:9:31: 9:32 - _1 = <impl Generator<bool> as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 - // mir::Constant @@ -71,8 +71,8 @@ + StorageLive(_10); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_11); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 + StorageLive(_12); // scope 0 at $DIR/inline-generator.rs:9:14: 9:46 -+ _12 = discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))); // 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 ++ _12 = discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))); // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 ++ switchInt(move _12) -> [0_u32: bb3, 1_u32: bb8, 3_u32: bb7, otherwise: bb9]; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 } - bb3: { @@ -94,47 +94,47 @@ + } + + bb3: { -+ _11 = 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 -+ 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 ++ _11 = move _7; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 ++ StorageLive(_8); // scope 6 at $DIR/inline-generator.rs:15:17: 15:39 ++ StorageLive(_9); // scope 6 at $DIR/inline-generator.rs:15:20: 15:21 ++ _9 = _11; // scope 6 at $DIR/inline-generator.rs:15:20: 15:21 ++ switchInt(move _9) -> [false: bb5, otherwise: bb4]; // scope 6 at $DIR/inline-generator.rs:15:20: 15:21 + } + + bb4: { -+ _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 ++ _8 = const 7_i32; // scope 6 at $DIR/inline-generator.rs:15:24: 15:25 ++ goto -> bb6; // scope 6 at $DIR/inline-generator.rs:15:17: 15:39 + } + + bb5: { -+ _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 ++ _8 = const 13_i32; // scope 6 at $DIR/inline-generator.rs:15:35: 15:37 ++ goto -> bb6; // scope 6 at $DIR/inline-generator.rs:15:17: 15:39 + } + + 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((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 3; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 ++ StorageDead(_9); // scope 6 at $DIR/inline-generator.rs:15:38: 15:39 ++ ((_1 as Yielded).0: i32) = move _8; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39 ++ discriminant(_1) = 0; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39 ++ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 3; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39 + goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:11: 15:39 + } + + bb7: { -+ 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((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 1; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 ++ StorageLive(_8); // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 ++ _10 = move _7; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 ++ StorageDead(_8); // scope 6 at $DIR/inline-generator.rs:15:38: 15:39 ++ ((_1 as Complete).0: bool) = move _10; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41 ++ discriminant(_1) = 1; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41 ++ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 1; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41 + goto -> bb1; // scope 0 at $DIR/inline-generator.rs:15:41: 15:41 + } + + bb8: { -+ assert(const false, "generator resumed after completion") -> [success: bb8, unwind: bb2]; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 ++ assert(const false, "generator resumed after completion") -> [success: bb8, unwind: bb2]; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 + } + + bb9: { -+ unreachable; // scope 6 at $DIR/inline-generator.rs:9:14: 9:46 ++ unreachable; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41 } } diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff index 337b9c59685..5903cdd9489 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.32bit.diff @@ -34,7 +34,7 @@ - (*_5) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + StorageLive(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + _7 = &mut (*_5); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:33: 8:41 - // + user_ty: UserType(1) @@ -42,10 +42,10 @@ - } - - bb2: { -+ // + span: $DIR/inline-into-box-place.rs:8:33: 8:43 ++ // + span: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL + // + user_ty: UserType(0) + // + literal: Const { ty: alloc::raw_vec::RawVec<u32>, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) } -+ ((*_7).1: usize) = const 0_usize; // scope 3 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_7).1: usize) = const 0_usize; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL + StorageDead(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 _1 = move _5; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 StorageDead(_5); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff index 4c7734a27b7..0f83b0c4a27 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.64bit.diff @@ -34,7 +34,7 @@ - (*_5) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + StorageLive(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + _7 = &mut (*_5); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:33: 8:41 - // + user_ty: UserType(1) @@ -42,10 +42,10 @@ - } - - bb2: { -+ // + span: $DIR/inline-into-box-place.rs:8:33: 8:43 ++ // + span: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL + // + user_ty: UserType(0) + // + literal: Const { ty: alloc::raw_vec::RawVec<u32>, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) } -+ ((*_7).1: usize) = const 0_usize; // scope 3 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_7).1: usize) = const 0_usize; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL + StorageDead(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 _1 = move _5; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 StorageDead(_5); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 diff --git a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir index 865cf25863f..9fd08f141dc 100644 --- a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir @@ -5,9 +5,9 @@ fn main() -> () { let _1: (); // in scope 0 at $DIR/inline-options.rs:9:5: 9:18 let _2: (); // in scope 0 at $DIR/inline-options.rs:10:5: 10:21 scope 1 (inlined inlined::<u32>) { // at $DIR/inline-options.rs:10:5: 10:21 - let _3: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21 - let _4: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21 - let _5: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21 + let _3: (); // in scope 1 at $DIR/inline-options.rs:16:23: 16:26 + let _4: (); // in scope 1 at $DIR/inline-options.rs:16:28: 16:31 + let _5: (); // in scope 1 at $DIR/inline-options.rs:16:33: 16:36 } bb0: { @@ -21,33 +21,33 @@ fn main() -> () { bb1: { StorageDead(_1); // scope 0 at $DIR/inline-options.rs:9:18: 9:19 StorageLive(_2); // scope 0 at $DIR/inline-options.rs:10:5: 10:21 - StorageLive(_3); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 - _3 = g() -> bb2; // scope 1 at $DIR/inline-options.rs:10:5: 10:21 + StorageLive(_3); // scope 1 at $DIR/inline-options.rs:16:23: 16:26 + _3 = g() -> bb2; // scope 1 at $DIR/inline-options.rs:16:23: 16:26 // mir::Constant - // + span: $DIR/inline-options.rs:10:5: 10:21 + // + span: $DIR/inline-options.rs:16:23: 16:24 // + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) } } bb2: { - StorageDead(_3); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 - StorageLive(_4); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 - _4 = g() -> bb3; // scope 1 at $DIR/inline-options.rs:10:5: 10:21 + StorageDead(_3); // scope 1 at $DIR/inline-options.rs:16:26: 16:27 + StorageLive(_4); // scope 1 at $DIR/inline-options.rs:16:28: 16:31 + _4 = g() -> bb3; // scope 1 at $DIR/inline-options.rs:16:28: 16:31 // mir::Constant - // + span: $DIR/inline-options.rs:10:5: 10:21 + // + span: $DIR/inline-options.rs:16:28: 16:29 // + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) } } bb3: { - StorageDead(_4); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 - StorageLive(_5); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 - _5 = g() -> bb4; // scope 1 at $DIR/inline-options.rs:10:5: 10:21 + StorageDead(_4); // scope 1 at $DIR/inline-options.rs:16:31: 16:32 + StorageLive(_5); // scope 1 at $DIR/inline-options.rs:16:33: 16:36 + _5 = g() -> bb4; // scope 1 at $DIR/inline-options.rs:16:33: 16:36 // mir::Constant - // + span: $DIR/inline-options.rs:10:5: 10:21 + // + span: $DIR/inline-options.rs:16:33: 16:34 // + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) } } bb4: { - StorageDead(_5); // scope 1 at $DIR/inline-options.rs:10:5: 10:21 + StorageDead(_5); // scope 1 at $DIR/inline-options.rs:16:36: 16:37 StorageDead(_2); // scope 0 at $DIR/inline-options.rs:10:21: 10:22 _0 = const (); // scope 0 at $DIR/inline-options.rs:8:11: 11:2 return; // scope 0 at $DIR/inline-options.rs:11:2: 11:2 diff --git a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir index 53c2c22182f..1aa859484f6 100644 --- a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir @@ -15,10 +15,10 @@ fn bar() -> bool { let mut _9: &i32; // in scope 1 at $DIR/inline-retag.rs:12:11: 12:14 let mut _10: &i32; // in scope 1 at $DIR/inline-retag.rs:12:7: 12:9 scope 2 (inlined foo) { // at $DIR/inline-retag.rs:12:5: 12:15 - debug x => _3; // in scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - debug y => _6; // in scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - let mut _11: i32; // in scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - let mut _12: i32; // in scope 2 at $DIR/inline-retag.rs:12:5: 12:15 + debug x => _3; // in scope 2 at $DIR/inline-retag.rs:16:8: 16:9 + debug y => _6; // in scope 2 at $DIR/inline-retag.rs:16:17: 16:18 + let mut _11: i32; // in scope 2 at $DIR/inline-retag.rs:17:5: 17:7 + let mut _12: i32; // in scope 2 at $DIR/inline-retag.rs:17:11: 17:13 } } @@ -52,15 +52,15 @@ fn bar() -> bool { Retag(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 _6 = &(*_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 Retag(_6); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - Retag(_3); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - Retag(_6); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - StorageLive(_11); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - _11 = (*_3); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - StorageLive(_12); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - _12 = (*_6); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - _0 = Eq(move _11, move _12); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - StorageDead(_12); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 - StorageDead(_11); // scope 2 at $DIR/inline-retag.rs:12:5: 12:15 + Retag(_3); // scope 2 at $DIR/inline-retag.rs:16:1: 18:2 + Retag(_6); // scope 2 at $DIR/inline-retag.rs:16:1: 18:2 + StorageLive(_11); // scope 2 at $DIR/inline-retag.rs:17:5: 17:7 + _11 = (*_3); // scope 2 at $DIR/inline-retag.rs:17:5: 17:7 + StorageLive(_12); // scope 2 at $DIR/inline-retag.rs:17:11: 17:13 + _12 = (*_6); // scope 2 at $DIR/inline-retag.rs:17:11: 17:13 + _0 = Eq(move _11, move _12); // scope 2 at $DIR/inline-retag.rs:17:5: 17:13 + StorageDead(_12); // scope 2 at $DIR/inline-retag.rs:17:12: 17:13 + StorageDead(_11); // scope 2 at $DIR/inline-retag.rs:17:12: 17:13 StorageDead(_6); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 StorageDead(_3); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 StorageDead(_2); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 diff --git a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff index c53e7970787..a7e0a52f743 100644 --- a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff +++ b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff @@ -18,7 +18,7 @@ - } - - bb1: { -+ _0 = (*_2); // scope 1 at $DIR/inline-shims.rs:6:5: 6:14 ++ _0 = (*_2); // scope 1 at $SRC_DIR/core/src/clone.rs:LL:COL StorageDead(_2); // scope 0 at $DIR/inline-shims.rs:6:13: 6:14 return; // scope 0 at $DIR/inline-shims.rs:7:2: 7:2 } diff --git a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff index d287d3c7a89..b6d5f51c173 100644 --- a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff +++ b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff @@ -12,8 +12,8 @@ } scope 2 { + scope 3 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline-shims.rs:12:14: 12:40 -+ let mut _6: isize; // in scope 3 at $DIR/inline-shims.rs:12:14: 12:40 -+ let mut _7: isize; // in scope 3 at $DIR/inline-shims.rs:12:14: 12:40 ++ let mut _6: isize; // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL ++ let mut _7: isize; // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL + } } @@ -38,8 +38,8 @@ - // + literal: Const { ty: unsafe fn(*mut Option<B>) {std::ptr::drop_in_place::<Option<B>>}, val: Value(Scalar(<ZST>)) } + StorageLive(_6); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40 + StorageLive(_7); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40 -+ _6 = discriminant((*_5)); // scope 3 at $DIR/inline-shims.rs:12:14: 12:40 -+ switchInt(move _6) -> [0_isize: bb2, otherwise: bb3]; // scope 3 at $DIR/inline-shims.rs:12:14: 12:40 ++ _6 = discriminant((*_5)); // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL ++ switchInt(move _6) -> [0_isize: bb2, otherwise: bb3]; // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } bb2: { @@ -50,7 +50,7 @@ + } + + bb3: { -+ drop((((*_5) as Some).0: B)) -> bb2; // scope 3 at $DIR/inline-shims.rs:12:14: 12:40 ++ drop((((*_5) as Some).0: B)) -> bb2; // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } } diff --git a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff index 4be00dfacb3..97ff6f75f24 100644 --- a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff @@ -19,7 +19,7 @@ - } - - bb1: { -+ _1 = const 123_u32; // scope 2 at $DIR/inline-specialization.rs:5:13: 5:38 ++ _1 = const 123_u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34 _0 = const (); // scope 0 at $DIR/inline-specialization.rs:4:11: 6:2 StorageDead(_1); // scope 0 at $DIR/inline-specialization.rs:6:1: 6:2 return; // scope 0 at $DIR/inline-specialization.rs:6:2: 6:2 diff --git a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir index 01be1f3907c..9d8818e657e 100644 --- a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir @@ -6,8 +6,8 @@ fn test2(_1: &dyn X) -> bool { let mut _2: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 let mut _3: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 scope 1 (inlined test) { // at $DIR/inline-trait-method_2.rs:5:5: 5:12 - debug x => _2; // in scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 - let mut _4: &dyn X; // in scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 + debug x => _2; // in scope 1 at $DIR/inline-trait-method_2.rs:9:9: 9:10 + let mut _4: &dyn X; // in scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 } bb0: { @@ -16,16 +16,16 @@ fn test2(_1: &dyn X) -> bool { _3 = &(*_1); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 _2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 StorageDead(_3); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - StorageLive(_4); // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 - _4 = _2; // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 - _0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 + StorageLive(_4); // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 + _4 = _2; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 + _0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 // mir::Constant - // + span: $DIR/inline-trait-method_2.rs:5:5: 5:12 + // + span: $DIR/inline-trait-method_2.rs:10:7: 10:8 // + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {<dyn X as X>::y}, val: Value(Scalar(<ZST>)) } } bb1: { - StorageDead(_4); // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12 + StorageDead(_4); // scope 1 at $DIR/inline-trait-method_2.rs:10:9: 10:10 StorageDead(_2); // scope 0 at $DIR/inline-trait-method_2.rs:5:11: 5:12 return; // scope 0 at $DIR/inline-trait-method_2.rs:6:2: 6:2 } diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir index 1b5153daa8b..e9c02cf2c67 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir @@ -7,8 +7,8 @@ fn a(_1: &mut [T]) -> &mut [T] { let mut _3: &mut [T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 let mut _4: &mut [T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 scope 1 (inlined <[T] as AsMut<[T]>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - debug self => _4; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - let mut _5: &mut [T]; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + debug self => _4; // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL + let mut _5: &mut [T]; // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL } bb0: { @@ -16,10 +16,10 @@ fn a(_1: &mut [T]) -> &mut [T] { StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 StorageLive(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 _4 = &mut (*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageLive(_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - _5 = &mut (*_4); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - _3 = &mut (*_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageDead(_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + StorageLive(_5); // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL + _5 = &mut (*_4); // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL + _3 = &mut (*_5); // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL + StorageDead(_5); // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL _2 = &mut (*_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 StorageDead(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:14: 3:15 _0 = &mut (*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir index 257ddec780e..9264d41554a 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir @@ -7,9 +7,9 @@ fn b(_1: &mut Box<T>) -> &mut T { let mut _3: &mut T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 let mut _4: &mut std::boxed::Box<T>; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 scope 1 (inlined <Box<T> as AsMut<T>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - debug self => _4; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - let mut _5: &mut T; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - let mut _6: &mut T; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + debug self => _4; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + let mut _5: &mut T; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + let mut _6: &mut T; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL } bb0: { @@ -17,13 +17,13 @@ fn b(_1: &mut Box<T>) -> &mut T { StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 StorageLive(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 _4 = &mut (*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageLive(_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageLive(_6); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - _6 = &mut (*(*_4)); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - _5 = &mut (*_6); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - _3 = &mut (*_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageDead(_6); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageDead(_5); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + StorageLive(_5); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + StorageLive(_6); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + _6 = &mut (*(*_4)); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + _5 = &mut (*_6); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + _3 = &mut (*_5); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + StorageDead(_6); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL + StorageDead(_5); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL _2 = &mut (*_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 StorageDead(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:14: 8:15 _0 = &mut (*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir index 9817e8cd5fa..23f33daaa57 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir @@ -6,14 +6,14 @@ fn c(_1: &[T]) -> &[T] { let _2: &[T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 let mut _3: &[T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 scope 1 (inlined <[T] as AsRef<[T]>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 - debug self => _3; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 + debug self => _3; // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL } bb0: { StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 _3 = &(*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 - _2 = _3; // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 + _2 = _3; // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL _0 = &(*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:14: 13:15 StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:14:1: 14:2 diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir index e49c91581b3..422bf748d9f 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir @@ -6,14 +6,14 @@ fn d(_1: &Box<T>) -> &T { let _2: &T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 let mut _3: &std::boxed::Box<T>; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 scope 1 (inlined <Box<T> as AsRef<T>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 - debug self => _3; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 + debug self => _3; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL } bb0: { StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 _3 = &(*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 - _2 = &(*(*_3)); // scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 + _2 = &(*(*_3)); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL _0 = &(*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:14: 18:15 StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:1: 19:2 diff --git a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir index d62f78eaa32..42704b06883 100644 --- a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir @@ -10,10 +10,10 @@ fn main() -> () { scope 1 { debug f => _1; // in scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:5:9: 5:10 scope 2 (inlined main::{closure#0}) { // at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 - debug x => _5; // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 - let _6: (); // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 + debug x => _5; // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:5:14: 5:15 + let _6: (); // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:5:23: 5:24 scope 3 { - debug y => _6; // in scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 + debug y => _6; // in scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:5:23: 5:24 } } } @@ -27,8 +27,8 @@ fn main() -> () { (_3.0: ()) = move _4; // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 StorageLive(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 _5 = move (_3.0: ()); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 - StorageLive(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 - StorageDead(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 + StorageLive(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:5:23: 5:24 + StorageDead(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:5:32: 5:33 StorageDead(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10 StorageDead(_4); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10 StorageDead(_3); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10 diff --git a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff index 0a30bd3d8ca..9e92f025b76 100644 --- a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff +++ b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff @@ -29,7 +29,7 @@ - // mir::Constant - // + span: $DIR/issue-78442.rs:11:5: 11:15 - // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(Scalar(<ZST>)) } -+ _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $DIR/issue-78442.rs:11:5: 11:17 ++ _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL } bb2: { |
