-
Notifications
You must be signed in to change notification settings - Fork 2k
cargo clippy --fix don't remove redundant mut #14617
Copy link
Copy link
Closed as duplicate of#8943
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesS-fixedStatus: Issues that got fixed, waiting to be closed as completedStatus: Issues that got fixed, waiting to be closed as completedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesS-fixedStatus: Issues that got fixed, waiting to be closed as completedStatus: Issues that got fixed, waiting to be closed as completedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
cargo clippy --fixcan autofix more problemsReproducer
I tried this code:
I expected to see this happen:
cargo clippy --fixremoves this redundantmut.Instead, this happened:
cargo clippy --fixwarns about this redundantmutI don't see any use cases were this
mutcan make side effects and it is not safe to remove it automatically. Is it just not implemented yet or there are some cases where auto removing thismutcan bring side effects?Version
Additional Labels
No response
Summary Notes
Generated by triagebot, see help for how to add more