Update the previously checkpointed (but unused by bors) tests to reflect current reality.

This commit is contained in:
Felix S. Klock II
2018-04-12 12:25:29 +02:00
parent 02a7809f1c
commit ea454746b3
19 changed files with 174 additions and 50 deletions

View File

@@ -1,20 +1,26 @@
error[E0594]: cannot assign to immutable item `*x`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error[E0594]: cannot assign to immutable item `*x`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error[E0594]: cannot assign to immutable item `*x`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error: aborting due to 3 previous errors

View File

@@ -1,20 +1,26 @@
error[E0594]: cannot assign to immutable item `*n`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error[E0594]: cannot assign to immutable item `*n`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error[E0594]: cannot assign to immutable item `*n`
error[E0594]: cannot assign to data in 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 mutate
| ^^^^^^^
error: aborting due to 3 previous errors