2018-01-15 10:55:10 -08:00
|
|
|
error: borrowed data cannot be stored outside of its closure
|
|
|
|
--> $DIR/regions-escape-bound-fn.rs:18:27
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let mut x: Option<&isize> = None;
|
2018-01-19 12:30:30 -08:00
|
|
|
| ----- borrowed data cannot be stored into here...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | with_int(|y| x = Some(y));
|
2018-01-19 12:30:30 -08:00
|
|
|
| --- ^ cannot be stored outside of its closure
|
|
|
|
| |
|
|
|
|
| ...because it cannot outlive this closure
|
2018-01-15 10:55:10 -08:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|