Reword to avoid using either re-assignment or reassignment in errors
This commit is contained in:
parent
b2478052f8
commit
0e46cf4db4
10 changed files with 21 additions and 21 deletions
|
|
@ -15,9 +15,9 @@ fn main() {
|
|||
let foo = &mut 1;
|
||||
|
||||
let &mut x = foo;
|
||||
x += 1; //[ast]~ ERROR re-assignment of immutable variable
|
||||
//[mir]~^ ERROR re-assignment of immutable variable `x` (Ast)
|
||||
//[mir]~| ERROR re-assignment of immutable variable `x` (Mir)
|
||||
x += 1; //[ast]~ ERROR cannot assign twice to immutable variable
|
||||
//[mir]~^ ERROR cannot assign twice to immutable variable `x` (Ast)
|
||||
//[mir]~| ERROR cannot assign twice to immutable variable `x` (Mir)
|
||||
|
||||
// explicitly mut-ify internals
|
||||
let &mut mut x = foo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue