Skip to content

Conversation

samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Apr 16, 2025

The explicit_into_iter_loop, explicit_iter_loop and iter_next_loop will now:

  • trigger only when the triggering expression is not located into macro code;
  • properly expose code rewrite proposal with code coming from the root context.

changelog: [explicit_into_iter_loop, explicit_iter_loop, iter_next_loop]: behave in macro context

Fixes #14630

@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2025

r? @llogiq

rustbot has assigned @llogiq.
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 Apr 16, 2025
@rustbot

This comment has been minimized.

@samueltardieu
Copy link
Member Author

Rebased

r? clippy

@rustbot rustbot assigned y21 and unassigned llogiq May 5, 2025
@rustbot

This comment has been minimized.

The `explicit_into_iter_loop`, `explicit_iter_loop` and `iter_next_loop`
will now:

- trigger only when the triggering expression is not located into macro
  code;
- properly expose code rewrite proposal with code coming from the root
  context.
@samueltardieu
Copy link
Member Author

Rebased

Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@y21 y21 added this pull request to the merge queue May 20, 2025
Merged via the queue into rust-lang:master with commit 5687ed5 May 20, 2025
11 checks passed
@samueltardieu samueltardieu deleted the loop-macro-fixes branch May 21, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect macro handling in various loop lints
4 participants