1
Fork 0

span_suggestion

This commit is contained in:
csmoe 2018-06-14 09:12:50 +08:00 committed by ashtneoi
parent 8932684ccc
commit 7a70140ed5
6 changed files with 28 additions and 11 deletions

View file

@ -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