about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlqd <remy.rakic+github@gmail.com>2019-06-12 13:01:26 +0200
committerlqd <remy.rakic+github@gmail.com>2019-07-22 10:32:39 +0200
commitc5a1bc1e5c45c507b247e92d33a35190257c6726 (patch)
tree65a0cfb6e439270f8aa4560c49951bd3877e9225
parent6a7c15ed25c17dfae87cc8561e7171ab749377e3 (diff)
downloadrust-c5a1bc1e5c45c507b247e92d33a35190257c6726.tar.gz
rust-c5a1bc1e5c45c507b247e92d33a35190257c6726.zip
Bless output of test nll/get_default.rs for Polonius
2 of the 3 errors are "fixed by Polonius" :tada:
-rw-r--r--src/test/ui/nll/get_default.polonius.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/nll/get_default.polonius.stderr b/src/test/ui/nll/get_default.polonius.stderr
new file mode 100644
index 00000000000..2df6d5d61fc
--- /dev/null
+++ b/src/test/ui/nll/get_default.polonius.stderr
@@ -0,0 +1,15 @@
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
+  --> $DIR/get_default.rs:32:17
+   |
+LL |         match map.get() {
+   |               --- immutable borrow occurs here
+LL |             Some(v) => {
+LL |                 map.set(String::new()); // Both AST and MIR error here
+   |                 ^^^ mutable borrow occurs here
+LL |
+LL |                 return v;
+   |                        - immutable borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0502`.