fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `a::{closure#0}` 0 generator_resume 2/* generator_layout = GeneratorLayout { 3 field_tys: {}, 4 variant_fields: { 5 Unresumed(0): [], 6 Returned (1): [], 7 Panicked (2): [], 8 }, 9 storage_conflicts: BitMatrix(0x0) {}, 10} */ 11 12fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>, _2: &mut Context<'_>) -> Poll<()> { 13 debug _task_context => _4; 14 let mut _0: std::task::Poll<()>; 15 let mut _3: (); 16 let mut _4: &mut std::task::Context<'_>; 17 let mut _5: u32; 18 19 bb0: { 20 _5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16}))); 21 switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5]; 22 } 23 24 bb1: { 25 _4 = move _2; 26 _3 = const (); 27 goto -> bb3; 28 } 29 30 bb2: { 31 _0 = Poll::<()>::Ready(move _3); 32 discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16}))) = 1; 33 return; 34 } 35 36 bb3: { 37 goto -> bb2; 38 } 39 40 bb4: { 41 assert(const false, "`async fn` resumed after completion") -> [success: bb4, unwind unreachable]; 42 } 43 44 bb5: { 45 unreachable; 46 } 47}