• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1- // MIR for `g` before Inline
2+ // MIR for `g` after Inline
3
4  fn g() -> () {
5      let mut _0: ();
6      let _1: ();
7+     let mut _2: fn() {main};
8+     let mut _5: ();
9+     scope 1 (inlined f::<fn() {main}>) {
10+         debug g => _2;
11+         let mut _3: &fn() {main};
12+         let _4: ();
13+         scope 2 (inlined <fn() {main} as Fn<()>>::call - shim(fn() {main})) {
14+         }
15+     }
16
17      bb0: {
18          StorageLive(_1);
19-         _1 = f::<fn() {main}>(main) -> [return: bb1, unwind continue];
20+         StorageLive(_2);
21+         _2 = main;
22+         StorageLive(_4);
23+         StorageLive(_3);
24+         _3 = &_2;
25+         StorageLive(_5);
26+         _5 = const ();
27+         _4 = move (*_3)() -> [return: bb4, unwind: bb2];
28      }
29
30      bb1: {
31+         StorageDead(_4);
32+         StorageDead(_2);
33          StorageDead(_1);
34          _0 = const ();
35          return;
36+     }
37+
38+     bb2 (cleanup): {
39+         drop(_2) -> [return: bb3, unwind terminate];
40+     }
41+
42+     bb3 (cleanup): {
43+         resume;
44+     }
45+
46+     bb4: {
47+         StorageDead(_5);
48+         StorageDead(_3);
49+         drop(_2) -> [return: bb1, unwind continue];
50      }
51  }
52
53