rust/src/test/compile-fail/borrowck-wg-borrow-mut-to-imm-fail.rs
2013-04-30 06:59:32 -04:00

8 lines
124 B
Rust

fn main() {
let mut b = ~3;
let _x = &mut *b;
let mut y = /*move*/ b; //~ ERROR cannot move out
*y += 1;
}