|
| 1 | +- // MIR for `g` before Inline |
| 2 | ++ // MIR for `g` after Inline |
| 3 | + |
| 4 | + fn g(_1: &mut S) -> std::future::from_generator::GenFuture<[static generator@$DIR/inline-async.rs:11:27: 13:2]> { |
| 5 | + debug s => _1; // in scope 0 at $DIR/inline-async.rs:+0:16: +0:17 |
| 6 | + let mut _0: std::future::from_generator::GenFuture<[static generator@$DIR/inline-async.rs:11:27: 13:2]>; // return place in scope 0 at $DIR/inline-async.rs:+0:27: +0:27 |
| 7 | + let mut _2: [static generator@$DIR/inline-async.rs:11:27: 13:2]; // in scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 8 | ++ scope 1 (inlined std::future::from_generator::<[static generator@$DIR/inline-async.rs:11:27: 13:2]>) { // at $DIR/inline-async.rs:11:27: 13:2 |
| 9 | ++ debug gen => _2; // in scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 10 | ++ let mut _3: [static generator@$DIR/inline-async.rs:11:27: 13:2]; // in scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 11 | ++ } |
| 12 | + |
| 13 | + bb0: { |
| 14 | + StorageLive(_2); // scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 15 | + Deinit(_2); // scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 16 | + (_2.0: &mut S) = move _1; // scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 17 | + discriminant(_2) = 0; // scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 18 | +- _0 = std::future::from_generator::<[static generator@$DIR/inline-async.rs:11:27: 13:2]>(move _2) -> bb1; // scope 0 at $DIR/inline-async.rs:+0:27: +2:2 |
| 19 | +- // mir::Constant |
| 20 | +- // + span: $DIR/inline-async.rs:11:27: 13:2 |
| 21 | +- // + literal: Const { ty: fn([static generator@$DIR/inline-async.rs:11:27: 13:2]) -> impl Future<Output = ()> {std::future::from_generator::<[static generator@$DIR/inline-async.rs:11:27: 13:2]>}, val: Value(<ZST>) } |
| 22 | +- } |
| 23 | +- |
| 24 | +- bb1: { |
| 25 | ++ StorageLive(_3); // scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 26 | ++ _3 = move _2; // scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 27 | ++ Deinit(_0); // scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 28 | ++ (_0.0: [static generator@$DIR/inline-async.rs:11:27: 13:2]) = move _3; // scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 29 | ++ StorageDead(_3); // scope 1 at $SRC_DIR/core/src/future/mod.rs:LL:COL |
| 30 | + StorageDead(_2); // scope 0 at $DIR/inline-async.rs:+2:1: +2:2 |
| 31 | + return; // scope 0 at $DIR/inline-async.rs:+2:2: +2:2 |
| 32 | + } |
| 33 | + } |
| 34 | + |
0 commit comments