Point at statics and consts being mutable borrowed or written to:
```
error[E0594]: cannot assign to immutable static item `NUM`
--> $DIR/E0594.rs:4:5
|
LL | static NUM: i32 = 18;
| --------------- this `static` cannot be written to
...
LL | NUM = 20;
| ^^^^^^^^ cannot assign
```
Point at the expression that couldn't be mutably borrowed from a pattern:
```
error[E0596]: cannot borrow data in a `&` reference as mutable
--> $DIR/mut-pattern-of-immutable-borrow.rs:19:14
|
LL | match &arg.field {
| ---------- this cannot be borrowed as mutable
LL | Some(ref mut s) => s.push('a'),
| ^^^^^^^^^ cannot borrow as mutable
```
|
||
|---|---|---|
| .. | ||
| mut-cant-alias.rs | ||
| mut-cant-alias.stderr | ||
| mut-cross-borrowing.rs | ||
| mut-cross-borrowing.stderr | ||
| mut-pattern-internal-mutability.rs | ||
| mut-pattern-internal-mutability.stderr | ||
| mut-pattern-mismatched.rs | ||
| mut-pattern-mismatched.stderr | ||
| mut-ref.rs | ||
| mut-suggestion.rs | ||
| mut-suggestion.stderr | ||
| mutable-class-fields-2.rs | ||
| mutable-class-fields-2.stderr | ||
| mutable-class-fields.rs | ||
| mutable-class-fields.stderr | ||
| mutable-enum-indirect.rs | ||
| mutable-enum-indirect.stderr | ||
| no-mut-lint-for-desugared-mut.rs | ||