]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-steal-closure.stderr
add UI test + docs for `E0789`
[rust.git] / tests / ui / regions / regions-steal-closure.stderr
1 error[E0597]: `i` does not live long enough
2   --> $DIR/regions-steal-closure.rs:14:28
3    |
4 LL |     let mut cl_box = {
5    |         ---------- borrow later stored here
6 LL |         let mut i = 3;
7 LL |         box_it(Box::new(|| i += 1))
8    |                         -- ^ borrowed value does not live long enough
9    |                         |
10    |                         value captured here
11 LL |     };
12    |     - `i` dropped here while still borrowed
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0597`.