Skip to content

Fix wildcard_imports infinite loop on macro generated glob imports - #17828

Merged
dswij merged 1 commit into
rust-lang:masterfrom
Gri-ffin:issues/17799
Oct 19, 2026
Merged

dswij merged 1 commit into
rust-lang:masterfrom
Gri-ffin:issues/17799

Conversation

@Gri-ffin

@Gri-ffin Gri-ffin commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

fixes #17799
changelog: [wildcard_imports]: fix infinite loop on macro generated glob imports

@rustbot rustbot added 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 labels Oct 1, 2026
@rustbot

rustbot commented Oct 1, 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.

@CommanderStorm CommanderStorm left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@schneems schneems left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Community review: Does what it says on the tin, good work. Thanks!

There's an unhandled edgecase (found using an LLM to understand the code/codebase chat logs, that I manually validated/verified).

  • Requested: Add that test case for source code with a * in it after the macro call and fix.

The other comments are personal preference/style, feel free to dismiss them.

  • Optional(pedantic/bikeshed/naming) variable naming: Update span -> extended -> with_star variables to span -> span_until_glob -> span_with_glob.
  • Optional(pedantic/bikeshed/code-style) functional style: Get rid of intermediate variables by switching to a function style.

View changes since this review

Comment thread tests/ui/crashes/ice-17799.rs Resolved
Comment thread clippy_lints/src/wildcard_imports.rs Resolved
Comment thread clippy_lints/src/wildcard_imports.rs Resolved
@Gri-ffin
Gri-ffin force-pushed the issues/17799 branch 3 times, most recently from c02300a to 2fab9d6 Compare October 3, 2026 16:44

@schneems schneems left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks. I see the test in there and the fix seems to let it pass. LGTM.

View changes since this review

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

rustbot commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

r? @llogiq

rustbot has assigned @llogiq for the project review.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 9 candidates
  • 9 candidates expanded to 9 candidates
  • Random selection from 6 candidates

@dswij dswij left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dswij
dswij added this pull request to the merge queue Oct 19, 2026
Merged via the queue into rust-lang:master with commit 01ffa18 Oct 19, 2026
13 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 19, 2026
@Gri-ffin
Gri-ffin deleted the issues/17799 branch October 19, 2026 16:30
@CommanderStorm CommanderStorm added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 19, 2026
@flip1995

flip1995 commented Nov 5, 2026

Copy link
Copy Markdown
Member

rust-lang/rust#165499

@flip1995 flip1995 added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Nov 5, 2026
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Nov 5, 2026
[beta] backports

Cherry picked:
* #165497
* #165499
  - rust-lang/rust-clippy#17752 (was already last beta, but we didn't manage to get the proper fixed merged in time like we planned)
  - rust-lang/rust-clippy#17828
  - rust-lang/rust-clippy#17941

r? @ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Nov 5, 2026
[beta] backports

Cherry picked:
* #165497
* #165499
  - rust-lang/rust-clippy#17752 (was already last beta, but we didn't manage to get the proper fixed merged in time like we planned)
  - rust-lang/rust-clippy#17828
  - rust-lang/rust-clippy#17941

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wildcard_imports: infinite loop and unbounded memory growth on macro-generated glob imports

7 participants