| LL| |#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] |
| LL| |#![allow(unused_assignments)] |
| LL| |use std::ops::{Coroutine, CoroutineState}; |
| LL| 1| let mut coroutine = #[coroutine] |
| LL| 1| match Pin::new(&mut coroutine).resume(()) { |
| LL| 1| CoroutineState::Yielded(1) => {} |
| LL| 0| _ => panic!("unexpected value from resume"), |
| LL| 1| match Pin::new(&mut coroutine).resume(()) { |
| LL| 1| CoroutineState::Complete("foo") => {} |
| LL| 0| _ => panic!("unexpected value from resume"), |
| LL| 1| let mut coroutine = #[coroutine] |
| LL| 1| match Pin::new(&mut coroutine).resume(()) { |
| LL| 1| CoroutineState::Yielded(1) => {} |
| LL| 0| _ => panic!("unexpected value from resume"), |
| LL| 1| match Pin::new(&mut coroutine).resume(()) { |
| LL| 1| CoroutineState::Yielded(2) => {} |
| LL| 0| _ => panic!("unexpected value from resume"), |