diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-08-14 08:24:44 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-08-19 08:15:13 -0700 |
| commit | 58e4b54bd49a2a554ee8a573827b9ccbf7a9b65e (patch) | |
| tree | 6dc9383f0c27191e7692637f66ca852df11c77be /src/test/ui/mut | |
| parent | 4e50c5b6e45fc1b21b0e0bd6f7c9c5389e0b637f (diff) | |
| download | rust-58e4b54bd49a2a554ee8a573827b9ccbf7a9b65e.tar.gz rust-58e4b54bd49a2a554ee8a573827b9ccbf7a9b65e.zip | |
move tests to borrowck directory, remove feature(nll)
now compare-mode can show us the differences
Diffstat (limited to 'src/test/ui/mut')
| -rw-r--r-- | src/test/ui/mut/mutable-class-fields.ast.nll.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/mut/mutable-class-fields.mir.stderr | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/test/ui/mut/mutable-class-fields.ast.nll.stderr b/src/test/ui/mut/mutable-class-fields.ast.nll.stderr index 1d1e58de587..033a3bd6cb4 100644 --- a/src/test/ui/mut/mutable-class-fields.ast.nll.stderr +++ b/src/test/ui/mut/mutable-class-fields.ast.nll.stderr @@ -1,14 +1,11 @@ -error[E0384]: cannot assign twice to immutable variable `nyan` +error[E0594]: cannot assign to `nyan.how_hungry`, as `nyan` is not declared as mutable --> $DIR/mutable-class-fields.rs:28:3 | LL | let nyan : cat = cat(52, 99); - | ---- - | | - | first assignment to `nyan` - | consider changing this to `mut nyan` + | ---- help: consider changing this to be mutable: `mut nyan` LL | nyan.how_hungry = 0; //[ast]~ ERROR cannot assign - | ^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable + | ^^^^^^^^^^^^^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0384`. +For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/mut/mutable-class-fields.mir.stderr b/src/test/ui/mut/mutable-class-fields.mir.stderr index 1d1e58de587..033a3bd6cb4 100644 --- a/src/test/ui/mut/mutable-class-fields.mir.stderr +++ b/src/test/ui/mut/mutable-class-fields.mir.stderr @@ -1,14 +1,11 @@ -error[E0384]: cannot assign twice to immutable variable `nyan` +error[E0594]: cannot assign to `nyan.how_hungry`, as `nyan` is not declared as mutable --> $DIR/mutable-class-fields.rs:28:3 | LL | let nyan : cat = cat(52, 99); - | ---- - | | - | first assignment to `nyan` - | consider changing this to `mut nyan` + | ---- help: consider changing this to be mutable: `mut nyan` LL | nyan.how_hungry = 0; //[ast]~ ERROR cannot assign - | ^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable + | ^^^^^^^^^^^^^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0384`. +For more information about this error, try `rustc --explain E0594`. |
