rust/tests/ui/coroutine/reborrow-mut-upvar.rs
2023-10-20 21:14:02 +00:00

17 lines
227 B
Rust

// run-pass
#![feature(coroutines)]
fn _run(bar: &mut i32) {
|| { //~ WARN unused coroutine that must be used
{
let _baz = &*bar;
yield;
}
*bar = 2;
};
}
fn main() {}