Update NLL tests

This commit is contained in:
Vadim Petrochenkov
2019-03-11 23:18:35 +03:00
parent fa72a81bea
commit c1cfacfb13
287 changed files with 794 additions and 794 deletions

View File

@@ -5,7 +5,7 @@ LL | while let Some(Ok(string)) = foo.get() {
| --- immutable borrow occurs here
LL | foo.mutate();
| ^^^^^^^^^^^^ mutable borrow occurs here
LL | //~^ ERROR cannot borrow `foo` as mutable
LL |
LL | println!("foo={:?}", *string);
| ------- immutable borrow later used here

View File

@@ -1,19 +1,19 @@
error[E0594]: cannot assign to `*x` which is behind a `&` reference
--> $DIR/enum.rs:9:5
|
LL | *x += 1; //~ ERROR cannot assign to immutable
LL | *x += 1;
| ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
error[E0594]: cannot assign to `*x` which is behind a `&` reference
--> $DIR/enum.rs:13:9
|
LL | *x += 1; //~ ERROR cannot assign to immutable
LL | *x += 1;
| ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
error[E0594]: cannot assign to `*x` which is behind a `&` reference
--> $DIR/enum.rs:19:9
|
LL | *x += 1; //~ ERROR cannot assign to immutable
LL | *x += 1;
| ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
error: aborting due to 3 previous errors

View File

@@ -1,19 +1,19 @@
error[E0594]: cannot assign to `*n` which is behind a `&` reference
--> $DIR/explicit-mut.rs:7:13
|
LL | *n += 1; //~ ERROR cannot assign to immutable
LL | *n += 1;
| ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written
error[E0594]: cannot assign to `*n` which is behind a `&` reference
--> $DIR/explicit-mut.rs:15:13
|
LL | *n += 1; //~ ERROR cannot assign to immutable
LL | *n += 1;
| ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written
error[E0594]: cannot assign to `*n` which is behind a `&` reference
--> $DIR/explicit-mut.rs:23:13
|
LL | *n += 1; //~ ERROR cannot assign to immutable
LL | *n += 1;
| ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written
error: aborting due to 3 previous errors