]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/regions-escape-unboxed-closure.stderr
New upstream version 1.45.0+dfsg1
[rustc.git] / src / test / ui / borrowck / regions-escape-unboxed-closure.stderr
1 error[E0521]: borrowed data escapes outside of closure
2 --> $DIR/regions-escape-unboxed-closure.rs:5:23
3 |
4 LL | let mut x: Option<&isize> = None;
5 | ----- `x` declared here, outside of the closure body
6 LL | with_int(&mut |y| x = Some(y));
7 | - ^^^^^^^^^^^ `y` escapes the closure body here
8 | |
9 | `y` is a reference that is only valid in the closure body
10
11 error: aborting due to previous error
12