2018-01-15 12:55:10 -06:00
|
|
|
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-01-15 12:55:10 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let mut x = None;
|
2018-01-15 12:55:10 -06:00
|
|
|
| ----- borrowed data cannot be stored into here...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | with_int(|y| x = Some(y));
|
2018-01-15 12:55:10 -06:00
|
|
|
| --- ^ cannot be stored outside of its closure
|
|
|
|
| |
|
|
|
|
| ...because it cannot outlive this closure
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|