blob: fa77ab4e049586dc3fb94f644393a9ff24d27f22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#![feature(coroutines)]
fn main() {
#[coroutine]
|| {
// The reference in `_a` is a Legal with NLL since it ends before the yield
let _a = &mut true;
let b = &mut true;
//~^ borrow may still be in use when coroutine yields
yield ();
println!("{}", b);
};
}
|