2018-01-15 12:55:10 -06:00
|
|
|
error: borrowed data cannot be stored outside of its closure
|
|
|
|
--> $DIR/regions-escape-unboxed-closure.rs:16:32
|
|
|
|
|
|
2018-01-19 14:30:30 -06:00
|
|
|
15 | let mut x: Option<&isize> = None;
|
|
|
|
| ----- borrowed data cannot be stored into here...
|
2018-01-15 12:55:10 -06:00
|
|
|
16 | with_int(&mut |y| x = Some(y));
|
2018-01-19 14:30:30 -06:00
|
|
|
| --- ^ cannot be stored outside of its closure
|
|
|
|
| |
|
|
|
|
| ...because it cannot outlive this closure
|
2018-01-15 12:55:10 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|