rust/src/test/ui/generator/reborrow-mut-upvar.rs

17 lines
183 B
Rust
Raw Normal View History

// run-pass
#![feature(generators)]
fn _run(bar: &mut i32) {
|| {
{
let _baz = &*bar;
yield;
}
*bar = 2;
};
}
fn main() {}