-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
I think it's worth moving the clippy::unnecessary_mut_passed lint into rustc because it's a very basic coding mistake:
#![allow(unused_variables)]
fn foo(x: &u32) {}
fn bar(a: &[u32]) {}
fn spam(a: &[u32; 10]) {}
fn main() {
foo(&mut 10);
let mut a = [0_u32; 10];
bar(&mut a[..]);
spam(&mut a);
}
See also, for further improvements:
rust-lang/rust-clippy#5546
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.