Bless output of test nll/get_default.rs for Polonius

2 of the 3 errors are "fixed by Polonius" 🎉
This commit is contained in:
lqd 2019-06-12 13:01:26 +02:00
parent 6a7c15ed25
commit c5a1bc1e5c

View file

@ -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`.