rust/src/test/ui/generator/reborrow-mut-upvar.rs
2019-07-27 18:56:16 +03:00

17 lines
183 B
Rust

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