We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f664171 + 09b3fce commit 9352026Copy full SHA for 9352026
compiler/rustc_error_codes/src/error_codes/E0502.md
@@ -1,4 +1,5 @@
1
-A variable already borrowed as immutable was borrowed as mutable.
+A variable already borrowed with a certain mutability (either mutable or
2
+immutable) was borrowed again with a different mutability.
3
4
Erroneous code example:
5
@@ -13,7 +14,7 @@ fn foo(a: &mut i32) {
13
14
```
15
16
To fix this error, ensure that you don't have any other references to the
-variable before trying to access it mutably:
17
+variable before trying to access it with a different mutability:
18
19
20
fn bar(x: &mut i32) {}
0 commit comments