Hi, i wanted to execute the following code snippet:
fn main() { let x = 5; let (mut x,y) = (1,2); println!("{}",x); println!("{}",y);
}
and i got the following error:
warning: unused variable:
x
--> main.rs:2:9
|
2 | let mut x = 5;
| ^^^^^
|
= note: #[warn(unused_variables)] on by default
= note: to disable this warning, consider using_x
insteadwarning: variable does not need to be mutable
--> main.rs:2:9
|
2 | let mut x = 5;
| ^^^^^
|
= note: #[warn(unused_mut)] on by default
So does this mean that, that x with the prefix 'mut' is a new variable?