|
2 | 2 | + // MIR for `f` after Inline
|
3 | 3 |
|
4 | 4 | fn f(_1: impl Fn()) -> () {
|
5 |
| - debug g => _1; // in scope 0 at $DIR/cycle.rs:3:6: 3:7 |
6 |
| - let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:3:20: 3:20 |
7 |
| - let _2: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8 |
8 |
| - let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:4:5: 4:6 |
9 |
| - let mut _4: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 5 | + debug g => _1; // in scope 0 at $DIR/cycle.rs:5:6: 5:7 |
| 6 | + let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:5:20: 5:20 |
| 7 | + let _2: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| 8 | + let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| 9 | + let mut _4: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8 |
10 | 10 |
|
11 | 11 | bb0: {
|
12 |
| - StorageLive(_2); // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
13 |
| - StorageLive(_3); // scope 0 at $DIR/cycle.rs:4:5: 4:6 |
14 |
| - _3 = &_1; // scope 0 at $DIR/cycle.rs:4:5: 4:6 |
15 |
| - StorageLive(_4); // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
16 |
| - _2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:4:5: 4:8 |
| 12 | + StorageLive(_2); // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| 13 | + StorageLive(_3); // scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| 14 | + _3 = &_1; // scope 0 at $DIR/cycle.rs:6:5: 6:6 |
| 15 | + StorageLive(_4); // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
| 16 | + _2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:6:5: 6:8 |
17 | 17 | // mir::Constant
|
18 |
| - // + span: $DIR/cycle.rs:4:5: 4:6 |
| 18 | + // + span: $DIR/cycle.rs:6:5: 6:6 |
19 | 19 | // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as std::ops::FnOnce<()>>::Output {<impl Fn() as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
|
20 | 20 | }
|
21 | 21 |
|
22 | 22 | bb1: {
|
23 |
| - StorageDead(_4); // scope 0 at $DIR/cycle.rs:4:7: 4:8 |
24 |
| - StorageDead(_3); // scope 0 at $DIR/cycle.rs:4:7: 4:8 |
25 |
| - StorageDead(_2); // scope 0 at $DIR/cycle.rs:4:8: 4:9 |
26 |
| - _0 = const (); // scope 0 at $DIR/cycle.rs:3:20: 5:2 |
27 |
| - drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:5:1: 5:2 |
| 23 | + StorageDead(_4); // scope 0 at $DIR/cycle.rs:6:7: 6:8 |
| 24 | + StorageDead(_3); // scope 0 at $DIR/cycle.rs:6:7: 6:8 |
| 25 | + StorageDead(_2); // scope 0 at $DIR/cycle.rs:6:8: 6:9 |
| 26 | + _0 = const (); // scope 0 at $DIR/cycle.rs:5:20: 7:2 |
| 27 | + drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:7:1: 7:2 |
28 | 28 | }
|
29 | 29 |
|
30 | 30 | bb2: {
|
31 |
| - return; // scope 0 at $DIR/cycle.rs:5:2: 5:2 |
| 31 | + return; // scope 0 at $DIR/cycle.rs:7:2: 7:2 |
32 | 32 | }
|
33 | 33 |
|
34 | 34 | bb3 (cleanup): {
|
35 |
| - drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:5:1: 5:2 |
| 35 | + drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:7:1: 7:2 |
36 | 36 | }
|
37 | 37 |
|
38 | 38 | bb4 (cleanup): {
|
39 |
| - resume; // scope 0 at $DIR/cycle.rs:3:1: 5:2 |
| 39 | + resume; // scope 0 at $DIR/cycle.rs:5:1: 7:2 |
40 | 40 | }
|
41 | 41 | }
|
42 | 42 |
|
0 commit comments