]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/regions-escape-unboxed-closure.rs
Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, r=joshtriplett
[rust.git] / src / test / ui / borrowck / regions-escape-unboxed-closure.rs
1 fn with_int(f: &mut dyn FnMut(&isize)) {}
2
3 fn main() {
4     let mut x: Option<&isize> = None;
5     with_int(&mut |y| x = Some(y));
6     //~^ ERROR borrowed data escapes outside of closure
7 }