rust/tests/ui/coroutine/live-upvar-across-yield.rs
2024-02-16 20:02:50 +00:00

15 lines
213 B
Rust

//@ run-pass
#![feature(coroutines, coroutine_trait)]
use std::ops::Coroutine;
use std::pin::Pin;
fn main() {
let b = |_| 3;
let mut a = || {
b(yield);
};
Pin::new(&mut a).resume(());
}