span_suggestion
This commit is contained in:
parent
8932684ccc
commit
7a70140ed5
6 changed files with 28 additions and 11 deletions
|
@ -2,7 +2,7 @@ error[E0594]: cannot assign to immutable borrowed content `*x`
|
|||
--> $DIR/enum.rs:19:5
|
||||
|
|
||||
LL | let Wrap(x) = &Wrap(3);
|
||||
| - consider changing this to `x`
|
||||
| - help: use a mutable reference instead: `x`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^ cannot borrow as mutable
|
||||
|
||||
|
@ -10,7 +10,7 @@ error[E0594]: cannot assign to immutable borrowed content `*x`
|
|||
--> $DIR/enum.rs:23:9
|
||||
|
|
||||
LL | if let Some(x) = &Some(3) {
|
||||
| - consider changing this to `x`
|
||||
| - help: use a mutable reference instead: `x`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^ cannot borrow as mutable
|
||||
|
||||
|
@ -18,7 +18,7 @@ error[E0594]: cannot assign to immutable borrowed content `*x`
|
|||
--> $DIR/enum.rs:29:9
|
||||
|
|
||||
LL | while let Some(x) = &Some(3) {
|
||||
| - consider changing this to `x`
|
||||
| - help: use a mutable reference instead: `x`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^ cannot borrow as mutable
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue