2017-11-19 23:37:59 +01:00
|
|
|
// compile-flags: -Z borrowck=compare
|
2017-11-09 17:46:35 +03:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut x = Box::new(0);
|
|
|
|
let _u = x; // error shouldn't note this move
|
|
|
|
x = Box::new(1);
|
|
|
|
drop(x);
|
2017-11-20 13:13:27 +01:00
|
|
|
let _ = (1,x); //~ ERROR use of moved value: `x` (Ast)
|
|
|
|
//~^ ERROR use of moved value: `x` (Mir)
|
2017-11-09 17:46:35 +03:00
|
|
|
}
|