Skip to content

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Jul 15, 2025

Needed to split the lints crate.

changelog: split redundant_clone iterator checks into redundant_iter_cloned

Summary Notes

Managed by @rustbot—see help for details

@rustbot
Copy link
Collaborator

rustbot commented Jul 15, 2025

r? @blyxyas

rustbot has assigned @blyxyas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 15, 2025
Copy link

github-actions bot commented Jul 15, 2025

No changes for 81e8c67

@rustbot rustbot added S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work A-lint Area: New lints and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 15, 2025
@Jarcho Jarcho removed A-lint Area: New lints S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work labels Jul 15, 2025
@Jarcho
Copy link
Contributor Author

Jarcho commented Jul 15, 2025

The feature freeze not can be ignored. This is just splitting an existing lint.

Copy link
Member

@blyxyas blyxyas left a 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", ""),
Copy link
Member

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)

Copy link
Contributor Author

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.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jul 15, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants