Skip to content

Make emitting early lints late a delayed bug, rather than an ICE - #165852

Open
JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:early_lints
Open

JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:early_lints

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Fixes #165846 (comment)

The expression parser may sometimes emit early lints during late attribute parsing.
Those will never be emitted because the early lint buffer is already emptied at that time.
This is fine, as long as this only happens for code that is invalid.

An alternatively would be for the attribute parser to catch those lints and re-emit them, but imo that complexity is not worth it if this only happens for invalid code.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 12, 2026
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

r? @tiif

rustbot has assigned @tiif.
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: compiler
  • compiler expanded to 79 candidates
  • Random selection from 19 candidates

@JonathanBrouwer JonathanBrouwer changed the title Make emitting early lints late a delayed bug, rather than an error Make emitting early lints late a delayed bug, rather than an ICE Nov 12, 2026

This branch has not been deployed

No deployments
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: Buffered lints are not stolen yet

3 participants