Add unnecessary_ref_mut lint#12399
Add unnecessary_ref_mut lint#12399not-elm wants to merge 1 commit intorust-lang:masterfrom not-elm:feature/unnecessary_ref_mut
unnecessary_ref_mut lint#12399Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
As-is, this will erroneously flag https://github.com/smol-rs/async-io/blob/master/src/lib.rs#L481 ( |
|
Yeah I think we should be careful about this lint. I don't think this makes sense as a restriction lint. I'm also a bit worried it's low-value. |
Sorry, I'm still learning English, so I couldn't read the text accurately. |
|
Yes, probably |
|
☔ The latest upstream changes (presumably #12077) made this pull request unmergeable. Please resolve the merge conflicts. |
ADD: add test case ADD: unnecessary ref mut lint add test cases and logic. FIX: Added case when passed as function argument FIX: add rebound variable to be inspected FIX: rebind FIX: rebind - If bound to static, it is considered mut - Fixed to get Ident inside Some FIX: cargo clippy Fixed conflict resolution failed.
|
Oh... I understand. Thank you. |
Related Issues: #12361
Added lint to detect whether a mutable reference is actually needed.
changelog: Add(
unnecessary_ref_mut)