updates to compile-fail tests for changes to NLL.
This commit is contained in:
parent
2d4df5b53e
commit
620a8536f6
3 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue