rust/src/test/ui/borrowck/regions-escape-bound-fn-2.stderr

13 lines
430 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-bound-fn-2.rs:8:27
|
2018-02-22 18:42:32 -06:00
LL | let mut x = None;
| ----- borrowed data cannot be stored into here...
2018-02-22 18:42:32 -06:00
LL | with_int(|y| x = Some(y));
| --- ^ cannot be stored outside of its closure
| |
| ...because it cannot outlive this closure
error: aborting due to previous error