-
Notifications
You must be signed in to change notification settings - Fork 1.7k
redundant_clone
: split iterator checks into redundant_iter_cloned
#15277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
No changes for 81e8c67 |
The feature freeze not can be ignored. This is just splitting an existing lint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this?
@@ -96,7 +95,7 @@ pub(super) fn check<'tcx>( | |||
} | |||
|
|||
let (lint, msg, trailing_clone) = match op { | |||
Op::RmCloned | Op::NeedlessMove(_) => (REDUNDANT_CLONE, "unneeded cloning of iterator items", ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm we may need to perform some tomfoolery here, checking for which lint is active, and if only redundant_clone
is, still lint it with a deprecation notice for a couple versions (If redundant_iter_cloned
is active, we can directly report that and avoid redundant_clone
altogether)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant_clone
is in the nursery right now since it's main part is very broken so I don't think we need to do anything special.
Needed to split the lints crate.
changelog: split
redundant_clone
iterator checks intoredundant_iter_cloned
Summary Notes
Managed by
@rustbot
—see help for details