Open
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