Reword to avoid using either re-assignment or reassignment in errors

This commit is contained in:
Carol (Nichols || Goulding) 2017-10-25 11:29:14 -04:00
parent b2478052f8
commit 0e46cf4db4
10 changed files with 21 additions and 21 deletions

View file

@ -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;