rust/src/test/ui/borrowck/regions-escape-unboxed-closure.stderr

13 lines
471 B
Plaintext
Raw Normal View History

error: borrowed data cannot be stored outside of its closure
2018-12-25 09:56:47 -06:00
--> $DIR/regions-escape-unboxed-closure.rs:6:32
|
2018-02-22 18:42:32 -06:00
LL | let mut x: Option<&isize> = None;
| ----- borrowed data cannot be stored into here...
2018-02-22 18:42:32 -06:00
LL | with_int(&mut |y| x = Some(y));
| --- ^ cannot be stored outside of its closure
| |
| ...because it cannot outlive this closure
error: aborting due to previous error