Closed
Description
Given the following code:
fn foo(_: &mut usize) {}
let mut a = 0;
let mut b = &mut a;
foo(&mut b);
there is no warning saying that the &mut
in the last line is unnecessary.
Some novice don't always have clear idea about where should have &mut
so they may add lots of unnecessary ones which leads to more unnecessary mut
variables.
It might be helpful if we can warn on this case so that they know this isn't necessary.