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
When destructuring a &mut reference to a Copy type in a let binding, clippy considers using a mut binding to be needless if the variable is not mutated later. However, the binding with mut causes dereference and shortens the borrow, so its removal might lead to borrow checking errors.
Summary
When destructuring a
&mut
reference to aCopy
type in alet
binding, clippy considers using amut
binding to be needless if the variable is not mutated later. However, the binding withmut
causes dereference and shortens the borrow, so its removal might lead to borrow checking errors.Lint Name
unused_mut
Reproducer
playground
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: