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