]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/inline/issue_78442.bar.Inline.diff
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / mir-opt / inline / issue_78442.bar.Inline.diff
1 - // MIR for `bar` before Inline
2 + // MIR for `bar` after Inline
3   
4   fn bar(_1: P) -> () {
5       debug _baz => _1;                    // in scope 0 at $DIR/issue_78442.rs:+2:5: +2:9
6       let mut _0: ();                      // return place in scope 0 at $DIR/issue_78442.rs:+3:3: +3:3
7       let _2: ();                          // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
8       let mut _3: &fn() {foo};             // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
9       let _4: fn() {foo};                  // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
10       let mut _5: ();                      // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
11 +     scope 1 (inlined <fn() {foo} as Fn<()>>::call - shim(fn() {foo})) { // at $DIR/issue_78442.rs:11:5: 11:17
12 +     }
13   
14       bb0: {
15           StorageLive(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
16           StorageLive(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
17           StorageLive(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
18 -         _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
19 +         _4 = hide_foo() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
20                                            // mir::Constant
21                                            // + span: $DIR/issue_78442.rs:11:5: 11:13
22                                            // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value(<ZST>) }
23       }
24   
25       bb1: {
26           _3 = &_4;                        // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
27           StorageLive(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
28           Deinit(_5);                      // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
29 -         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
30 -                                          // mir::Constant
31 -                                          // + span: $DIR/issue_78442.rs:11:5: 11:15
32 -                                          // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
33 +         _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL
34       }
35   
36       bb2: {
37 -         StorageDead(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
38 -         StorageDead(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
39 -         StorageDead(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
40 -         StorageDead(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
41 -         _0 = const ();                   // scope 0 at $DIR/issue_78442.rs:+3:3: +5:2
42 -         drop(_1) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
43 +         return;                          // scope 0 at $DIR/issue_78442.rs:+5:2: +5:2
44       }
45   
46 -     bb3: {
47 -         return;                          // scope 0 at $DIR/issue_78442.rs:+5:2: +5:2
48 +     bb3 (cleanup): {
49 +         drop(_1) -> bb4;                 // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
50       }
51   
52       bb4 (cleanup): {
53 -         drop(_1) -> bb5;                 // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
54 +         resume;                          // scope 0 at $DIR/issue_78442.rs:+0:1: +5:2
55       }
56   
57 -     bb5 (cleanup): {
58 -         resume;                          // scope 0 at $DIR/issue_78442.rs:+0:1: +5:2
59 +     bb5: {
60 +         StorageDead(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
61 +         StorageDead(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
62 +         StorageDead(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
63 +         StorageDead(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
64 +         _0 = const ();                   // scope 0 at $DIR/issue_78442.rs:+3:3: +5:2
65 +         drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
66       }
67   }
68