You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consider mutability on useless_vec suggestions
fixes#7035
changelog:
Now the suggested text considers mutability to suggest either `&[]`, as before, or `&mut []` if the used reference is mutable.
I tried this code:
I expected to see this happen:
clippy to suggest I could use a mutable reference to a slice.
e.g:
Instead, this happened:
clippy suggested I could use a slice, not mutable, so applying the suggestion results in code not compiling.
suggestion
compiler error:
Meta
cargo clippy -V
: clippy 0.1.51 (2fd73fab 2021-03-23)rustc -Vv
:binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-apple-darwin
release: 1.51.0
LLVM version: 11.0.1
The text was updated successfully, but these errors were encountered: