]>
Commit | Line | Data |
---|---|---|
223e47cc | 1 | fn test() { |
1a4d82fc | 2 | let v: isize; |
cdc7bbd5 | 3 | //~^ HELP consider making this binding mutable |
48663c56 XL |
4 | //~| SUGGESTION mut v |
5 | v = 1; //~ NOTE first assignment | |
1a4d82fc | 6 | println!("v={}", v); |
48663c56 XL |
7 | v = 2; //~ ERROR cannot assign twice to immutable variable |
8 | //~| NOTE cannot assign twice to immutable | |
1a4d82fc | 9 | println!("v={}", v); |
223e47cc LB |
10 | } |
11 | ||
12 | fn main() { | |
13 | } |