about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlqd <remy.rakic+github@gmail.com>2019-06-28 13:37:08 +0200
committerlqd <remy.rakic+github@gmail.com>2019-07-22 10:32:40 +0200
commit6fe52928a3dd9a69ebd6422a23aba879871026c4 (patch)
tree3a180d0f9b249f4fa359546e9ea1114dd28d329d
parent292d5c18c93df1a502a03f228e36c4c1da3d3f6b (diff)
downloadrust-6fe52928a3dd9a69ebd6422a23aba879871026c4.tar.gz
rust-6fe52928a3dd9a69ebd6422a23aba879871026c4.zip
Bless output of test borrowck/borrowck-escaping-closure-error-2.rs for Polonius
-rw-r--r--src/test/ui/borrowck/borrowck-escaping-closure-error-2.polonius.stderr16
1 files changed, 16 insertions, 0 deletions
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
index 00000000000..89af8764557
--- /dev/null
+++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.polonius.stderr
@@ -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`.