]> git.lizzy.rs Git - rust.git/commitdiff
Bless output of test borrowck/borrowck-escaping-closure-error-2.rs for Polonius
authorlqd <remy.rakic+github@gmail.com>
Fri, 28 Jun 2019 11:37:08 +0000 (13:37 +0200)
committerlqd <remy.rakic+github@gmail.com>
Mon, 22 Jul 2019 08:32:40 +0000 (10:32 +0200)
src/test/ui/borrowck/borrowck-escaping-closure-error-2.polonius.stderr [new file with mode: 0644]

diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.polonius.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.polonius.stderr
new file mode 100644 (file)
index 0000000..89af876
--- /dev/null
@@ -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`.