Skip to content

Use is_from_proc_macro instead of using snippet - #17518

Open
Gri-ffin wants to merge 7 commits into
rust-lang:masterfrom
Gri-ffin:rewrite/excessive_nesting
Open

Use is_from_proc_macro instead of using snippet#17518
Gri-ffin wants to merge 7 commits into
rust-lang:masterfrom
Gri-ffin:rewrite/excessive_nesting

Conversation

@Gri-ffin

@Gri-ffin Gri-ffin commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

(Since unsafe blocks can now be linted I'm not sure if I should add a changelog, given this is an internal change)

changelog: none

@rustbot rustbot added the S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. label Aug 7, 2026
@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request. A reviewer will take a look after it receives 2 community reviews.

In the meantime, we would highly appreciate if you could try to review any of PRs waiting on community reviews.

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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 7, 2026
@rustbot

This comment has been minimized.

@Jarcho

Jarcho commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Why does this need to be a late pass? The todo comment in the old version is just wrong about what the fix should have been.

@Gri-ffin

Gri-ffin commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

I can't speak for the author but I assumed there was a good reasoning behind the comment since it passed the review phase.

@Jarcho

Jarcho commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

It looks like it's only about is_from_proc_macro which can just be extended to work on ast::Block.

edit: Just checked and that's why.

@Gri-ffin Gri-ffin changed the title Rewrite excessive_nesting to LateLintPass Use is_from_proc_macro instead of using snippet Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. 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.

3 participants