fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
503 B16 linesraw
1error[E0597]: `books` does not live long enough
2  --> $DIR/borrowck-escaping-closure-error-2.rs:11:17
3   |
4LL |     Box::new(|| books.push(4))
5   |     ------------^^^^^---------
6   |     |        |  |
7   |     |        |  borrowed value does not live long enough
8   |     |        value captured here
9   |     borrow later used here
10LL |
11LL | }
12   | - `books` dropped here while still borrowed
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0597`.