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() { }