Skip to content

Commit 6fe5292

Browse files
committed
Bless output of test borrowck/borrowck-escaping-closure-error-2.rs for Polonius
1 parent 292d5c1 commit 6fe5292

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0597]: `books` does not live long enough
2+
--> $DIR/borrowck-escaping-closure-error-2.rs:11:17
3+
|
4+
LL | Box::new(|| books.push(4))
5+
| ------------^^^^^---------
6+
| | | |
7+
| | | borrowed value does not live long enough
8+
| | value captured here
9+
| borrow later used here
10+
LL |
11+
LL | }
12+
| - `books` 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`.

0 commit comments

Comments
 (0)