Closed
Description
fn main() {
match (3u, 'd') {
(mut x, c@'a'..'z') |
(mut x, c@'A'..'Z') |
(mut x, c@'0'..'9') => {
x = 4u;
println!("c: {} {}", c, x);
}
_ => {
println!("fail");
}
}
}
Output:
Untitled.rs:4:10: 4:15 warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
Untitled.rs:4 (mut x, c@'A'..'Z') |
^~~~~
Untitled.rs:5:10: 5:15 warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
Untitled.rs:5 (mut x, c@'0'..'9') => {
^~~~~
c: d 4