]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/regions-escape-bound-fn-2.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / borrowck / regions-escape-bound-fn-2.stderr
CommitLineData
f9f354fc
XL
1error[E0521]: borrowed data escapes outside of closure
2 --> $DIR/regions-escape-bound-fn-2.rs:11:18
2c00a5a8 3 |
0531ce1d 4LL | let mut x = None;
f9f354fc 5 | ----- `x` declared here, outside of the closure body
0531ce1d 6LL | with_int(|y| x = Some(y));
f9f354fc
XL
7 | - ^^^^^^^^^^^ `y` escapes the closure body here
8 | |
9 | `y` is a reference that is only valid in the closure body
2c00a5a8
XL
10
11error: aborting due to previous error
12
5869c6ff 13For more information about this error, try `rustc --explain E0521`.