We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a7c15e commit c5a1bc1Copy full SHA for c5a1bc1
src/test/ui/nll/get_default.polonius.stderr
@@ -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