updates to compile-fail tests for changes to NLL.

This commit is contained in:
Felix S. Klock II 2018-06-12 19:12:19 +02:00
parent 2d4df5b53e
commit 620a8536f6
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ fn indirect_write_to_imm_box() {
let y: Box<_> = box &mut x;
let p = &y;
***p = 2; //[ast]~ ERROR cannot assign to data in a `&` reference
//[mir]~^ ERROR cannot assign to data in a `&` reference
//[mir]~^ ERROR cannot assign to `***p`
drop(p);
}

View file

@ -70,6 +70,6 @@ fn main() {
};
s[2] = 20;
//[ast]~^ ERROR cannot assign to immutable indexed content
//[mir]~^^ ERROR cannot assign to immutable item
//[mir]~^^ ERROR cannot assign to data in a `&` reference
drop(rs);
}

View file

@ -23,6 +23,6 @@ fn main() {
call(|| {
counter += 1;
//[ast]~^ ERROR cannot assign to data in a captured outer variable in an `Fn` closure
//[mir]~^^ ERROR cannot assign to immutable item `counter`
//[mir]~^^ ERROR cannot assign to `counter`
});
}