]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/regions-escape-unboxed-closure.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / regions-escape-unboxed-closure.stderr
1 error: borrowed data cannot be stored outside of its closure
2   --> $DIR/regions-escape-unboxed-closure.rs:16:32
3    |
4 LL |     let mut x: Option<&isize> = None;
5    |         ----- borrowed data cannot be stored into here...
6 LL |     with_int(&mut |y| x = Some(y));
7    |                   ---          ^ cannot be stored outside of its closure
8    |                   |
9    |                   ...because it cannot outlive this closure
10
11 error: aborting due to previous error
12