rust/src/test/compile-fail/borrowck-wg-move-base-2.rs

10 lines
148 B
Rust
Raw Normal View History

fn foo(x: &mut int) {
let mut a = 3;
let mut _y = &mut *x;
let _z = &mut *_y;
2013-03-15 14:24:24 -05:00
_y = &mut a; //~ ERROR cannot assign
}
fn main() {
}