2012-05-23 22:53:49 -05:00
|
|
|
fn test() {
|
2019-04-22 02:40:08 -05:00
|
|
|
let v: isize = 1; //~ NOTE first assignment
|
2021-04-12 17:29:09 -05:00
|
|
|
//~| HELP consider making this binding mutable
|
2019-04-22 02:40:08 -05:00
|
|
|
//~| SUGGESTION mut v
|
2013-07-02 14:47:32 -05:00
|
|
|
v.clone();
|
2019-04-22 02:40:08 -05:00
|
|
|
v = 2; //~ ERROR cannot assign twice to immutable variable `v`
|
|
|
|
//~| NOTE cannot assign twice to immutable
|
2013-07-02 14:47:32 -05:00
|
|
|
v.clone();
|
2012-05-23 22:53:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|