2020-04-02 21:09:01 +00:00
|
|
|
// MIR for `main::{{closure}}#0` 0 generator_resume
|
2020-06-19 20:19:19 -07:00
|
|
|
/* generator_layout = GeneratorLayout {
|
|
|
|
field_tys: {
|
|
|
|
_0: HasDrop,
|
|
|
|
},
|
|
|
|
variant_fields: {
|
|
|
|
Unresumed(0): [],
|
|
|
|
Returned (1): [],
|
|
|
|
Panicked (2): [],
|
|
|
|
Suspend0 (3): [_0],
|
|
|
|
},
|
|
|
|
storage_conflicts: BitMatrix(1x1) {
|
|
|
|
(_0, _0),
|
|
|
|
},
|
|
|
|
} */
|
2020-04-02 21:09:01 +00:00
|
|
|
|
2020-03-31 23:41:45 +01:00
|
|
|
fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]>, _2: u8) -> std::ops::GeneratorState<(), ()> {
|
|
|
|
debug _x => _10; // in scope 0 at $DIR/generator-tiny.rs:19:17: 19:19
|
|
|
|
let mut _0: std::ops::GeneratorState<(), ()>; // return place in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
let _3: HasDrop; // in scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
|
|
|
|
let mut _4: !; // in scope 0 at $DIR/generator-tiny.rs:21:9: 24:10
|
|
|
|
let mut _5: (); // in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
let _6: u8; // in scope 0 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
let mut _7: (); // in scope 0 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
let _8: (); // in scope 0 at $DIR/generator-tiny.rs:23:13: 23:21
|
|
|
|
let mut _9: (); // in scope 0 at $DIR/generator-tiny.rs:19:25: 19:25
|
|
|
|
let _10: u8; // in scope 0 at $DIR/generator-tiny.rs:19:17: 19:19
|
2020-05-23 17:20:17 +02:00
|
|
|
let mut _11: u32; // in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
2020-04-02 21:09:01 +00:00
|
|
|
scope 1 {
|
2020-03-31 23:41:45 +01:00
|
|
|
debug _d => (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop); // in scope 1 at $DIR/generator-tiny.rs:20:13: 20:15
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-03-31 23:41:45 +01:00
|
|
|
_11 = discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]))); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
2020-06-19 18:57:15 +02:00
|
|
|
switchInt(move _11) -> [0_u32: bb1, 3_u32: bb5, otherwise: bb6]; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2020-03-31 23:41:45 +01:00
|
|
|
_10 = move _2; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
nop; // scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
|
|
|
|
(((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop) = HasDrop; // scope 0 at $DIR/generator-tiny.rs:20:18: 20:25
|
|
|
|
StorageLive(_4); // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
|
|
|
|
goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2020-03-31 23:41:45 +01:00
|
|
|
StorageLive(_6); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
StorageLive(_7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
_7 = (); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
_0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]))) = 3; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
|
|
|
return; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2020-03-31 23:41:45 +01:00
|
|
|
StorageDead(_7); // scope 1 at $DIR/generator-tiny.rs:22:17: 22:18
|
|
|
|
StorageDead(_6); // scope 1 at $DIR/generator-tiny.rs:22:18: 22:19
|
|
|
|
StorageLive(_8); // scope 1 at $DIR/generator-tiny.rs:23:13: 23:21
|
|
|
|
_8 = const callee() -> bb4; // scope 1 at $DIR/generator-tiny.rs:23:13: 23:21
|
2020-04-02 21:09:01 +00:00
|
|
|
// ty::Const
|
|
|
|
// + ty: fn() {callee}
|
|
|
|
// + val: Value(Scalar(<ZST>))
|
|
|
|
// mir::Constant
|
2020-03-31 23:41:45 +01:00
|
|
|
// + span: $DIR/generator-tiny.rs:23:13: 23:19
|
2020-04-02 21:09:01 +00:00
|
|
|
// + literal: Const { ty: fn() {callee}, val: Value(Scalar(<ZST>)) }
|
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2020-03-31 23:41:45 +01:00
|
|
|
StorageDead(_8); // scope 1 at $DIR/generator-tiny.rs:23:21: 23:22
|
|
|
|
_5 = const (); // scope 1 at $DIR/generator-tiny.rs:21:14: 24:10
|
2020-04-09 12:58:36 +02:00
|
|
|
// ty::Const
|
|
|
|
// + ty: ()
|
|
|
|
// + val: Value(Scalar(<ZST>))
|
|
|
|
// mir::Constant
|
2020-03-31 23:41:45 +01:00
|
|
|
// + span: $DIR/generator-tiny.rs:21:14: 24:10
|
2020-04-09 12:58:36 +02:00
|
|
|
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
2020-03-31 23:41:45 +01:00
|
|
|
goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2020-03-31 23:41:45 +01:00
|
|
|
StorageLive(_4); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
StorageLive(_6); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
StorageLive(_7); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
_6 = move _2; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
|
|
|
goto -> bb3; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2020-03-31 23:41:45 +01:00
|
|
|
unreachable; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
}
|