summary refs log tree commit diff
path: root/src/test/compile-fail/liveness-assign-imm-local-in-op-eq.rs
blob: baf0d55f057494516c4e15178bfae2acfd0f5bea (plain)
1
2
3
4
5
6
7
8
9
fn test() {
    let v: int;
    v = 2;  //~ NOTE prior assignment occurs here
    v += 1; //~ ERROR re-assignment of immutable variable
    copy v;
}

fn main() {
}