about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-wg-move-base-2.rs
blob: 0ede523daa4c68e2fcac62a1d2eb9d7f4b92ca36 (plain)
1
2
3
4
5
6
7
8
9
fn foo(x: &mut int) {
    let mut a = 3;
    let mut _y = &mut *x;
    let _z = &mut *_y;
    _y = &mut a; //~ ERROR assigning to mutable local variable prohibited
}

fn main() {
}