From c5a1bc1e5c45c507b247e92d33a35190257c6726 Mon Sep 17 00:00:00 2001 From: lqd Date: Wed, 12 Jun 2019 13:01:26 +0200 Subject: [PATCH] Bless output of test nll/get_default.rs for Polonius 2 of the 3 errors are "fixed by Polonius" :tada: --- src/test/ui/nll/get_default.polonius.stderr | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/nll/get_default.polonius.stderr 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 000000000000..2df6d5d61fc4 --- /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`.