Bless output of test borrowck/borrowck-escaping-closure-error-2.rs for Polonius
This commit is contained in:
parent
292d5c18c9
commit
6fe52928a3
1 changed files with 16 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
error[E0597]: `books` does not live long enough
|
||||
--> $DIR/borrowck-escaping-closure-error-2.rs:11:17
|
||||
|
|
||||
LL | Box::new(|| books.push(4))
|
||||
| ------------^^^^^---------
|
||||
| | | |
|
||||
| | | borrowed value does not live long enough
|
||||
| | value captured here
|
||||
| borrow later used here
|
||||
LL |
|
||||
LL | }
|
||||
| - `books` dropped here while still borrowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0597`.
|
Loading…
Reference in a new issue