fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB58 linesraw
1- // MIR for `bar` before RevealAll
2+ // MIR for `bar` after RevealAll
3  
4  fn bar(_1: P) -> () {
5      debug _baz => _1;
6      let mut _0: ();
7      let _2: ();
8-     let mut _3: &impl Fn();
9-     let _4: impl Fn();
10+     let mut _3: &fn() {foo};
11+     let _4: fn() {foo};
12      let mut _5: ();
13  
14      bb0: {
15          StorageLive(_2);
16          StorageLive(_3);
17          StorageLive(_4);
18          _4 = hide_foo() -> [return: bb1, unwind: bb6];
19      }
20  
21      bb1: {
22          _3 = &_4;
23          StorageLive(_5);
24          _5 = ();
25-         _2 = <impl Fn() as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb5];
26+         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb5];
27      }
28  
29      bb2: {
30          StorageDead(_5);
31          StorageDead(_3);
32          drop(_4) -> [return: bb3, unwind: bb6];
33      }
34  
35      bb3: {
36          StorageDead(_4);
37          StorageDead(_2);
38          _0 = const ();
39          drop(_1) -> [return: bb4, unwind: bb7];
40      }
41  
42      bb4: {
43          return;
44      }
45  
46      bb5 (cleanup): {
47          drop(_4) -> [return: bb6, unwind terminate(cleanup)];
48      }
49  
50      bb6 (cleanup): {
51          drop(_1) -> [return: bb7, unwind terminate(cleanup)];
52      }
53  
54      bb7 (cleanup): {
55          resume;
56      }
57  }
58