mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
updates to compile-fail tests for changes to NLL.
This commit is contained in:
@@ -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`
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user