NLL: Updates to diagnostic output in test/ui
.
This commit is contained in:
parent
7fd4b52b1b
commit
2d4df5b53e
31 changed files with 163 additions and 103 deletions
|
@ -1,26 +1,20 @@
|
|||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*x` which is behind a `&` reference
|
||||
--> $DIR/enum.rs:19:5
|
||||
|
|
||||
LL | let Wrap(x) = &Wrap(3);
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*x` which is behind a `&` reference
|
||||
--> $DIR/enum.rs:23:9
|
||||
|
|
||||
LL | if let Some(x) = &Some(3) {
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*x` which is behind a `&` reference
|
||||
--> $DIR/enum.rs:29:9
|
||||
|
|
||||
LL | while let Some(x) = &Some(3) {
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *x += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -1,26 +1,20 @@
|
|||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*n` which is behind a `&` reference
|
||||
--> $DIR/explicit-mut.rs:17:13
|
||||
|
|
||||
LL | Some(n) => {
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *n += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*n` which is behind a `&` reference
|
||||
--> $DIR/explicit-mut.rs:25:13
|
||||
|
|
||||
LL | Some(n) => {
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *n += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error[E0594]: cannot assign to data in a `&` reference
|
||||
error[E0594]: cannot assign to `*n` which is behind a `&` reference
|
||||
--> $DIR/explicit-mut.rs:33:13
|
||||
|
|
||||
LL | Some(n) => {
|
||||
| - help: consider changing this to be a mutable reference: `&mut`
|
||||
LL | *n += 1; //~ ERROR cannot assign to immutable
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ cannot assign
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue