Unnecessary &mut
should be warned
#53759
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
Given the following code:
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 unnecessarymut
variables.It might be helpful if we can warn on this case so that they know this isn't necessary.
The text was updated successfully, but these errors were encountered: