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

13 lines
472 B
Plaintext
Raw Normal View History

error: borrowed data cannot be stored outside of its closure
--> $DIR/regions-escape-unboxed-closure.rs:16:32
|
15 | let mut x: Option<&isize> = None;
| ----- borrowed data cannot be stored into here...
16 | 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