11 lines
270 B
Rust
11 lines
270 B
Rust
// compile-flags: -Z borrowck=compare
|
|
|
|
fn main() {
|
|
let mut x = Box::new(0);
|
|
let _u = x; // error shouldn't note this move
|
|
x = Box::new(1);
|
|
drop(x);
|
|
let _ = (1,x); //~ ERROR use of moved value: `x` (Ast)
|
|
//~^ ERROR use of moved value: `x` (Mir)
|
|
}
|