]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | error[E0521]: borrowed data escapes outside of closure |
2 | --> $DIR/regions-escape-bound-fn-2.rs:11:18 | |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | let mut x = None; |
f9f354fc | 5 | | ----- `x` declared here, outside of the closure body |
0531ce1d | 6 | LL | 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 | |
11 | error: aborting due to previous error | |
12 | ||
5869c6ff | 13 | For more information about this error, try `rustc --explain E0521`. |