fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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