Skip to content

Commit c5a1bc1

Browse files
committed
Bless output of test nll/get_default.rs for Polonius
2 of the 3 errors are "fixed by Polonius" 🎉
1 parent 6a7c15e commit c5a1bc1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
2+
--> $DIR/get_default.rs:32:17
3+
|
4+
LL | match map.get() {
5+
| --- immutable borrow occurs here
6+
LL | Some(v) => {
7+
LL | map.set(String::new()); // Both AST and MIR error here
8+
| ^^^ mutable borrow occurs here
9+
LL |
10+
LL | return v;
11+
| - immutable borrow later used here
12+
13+
error: aborting due to previous error
14+
15+
For more information about this error, try `rustc --explain E0502`.

0 commit comments

Comments
 (0)