]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-reinit.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / borrowck / borrowck-reinit.rs
1 // compile-flags: -Z borrowck=compare
2
3 fn main() {
4     let mut x = Box::new(0);
5     let _u = x; // error shouldn't note this move
6     x = Box::new(1);
7     drop(x);
8     let _ = (1,x); //~ ERROR use of moved value: `x` (Ast)
9     //~^ ERROR use of moved value: `x` (Mir)
10 }