Skip to content

Fix ICE when using attributes on delegation items#155146

Open
RaghavenderSingh wants to merge 1 commit intorust-lang:mainfrom
RaghavenderSingh:fix-ice-155127-delegation-delayed-lints
Open

Fix ICE when using attributes on delegation items#155146
RaghavenderSingh wants to merge 1 commit intorust-lang:mainfrom
RaghavenderSingh:fix-ice-155127-delegation-delayed-lints

Conversation

@RaghavenderSingh
Copy link
Copy Markdown

@RaghavenderSingh RaghavenderSingh commented Apr 11, 2026

Delegation items are skipped by hir_walk_toplevel_module (via
visit_if_delayed), so they were never added to delayed_lint_items.
This caused a debug assertion failure in emit_ast_lowering_delayed_lints
when an attribute like #[deprecated] generated a delayed lint on the item.

The FIXME in ItemCollector::new already noted this gap.

Fixes #155127

@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 Apr 11, 2026
@rustbot

This comment has been minimized.

Delegation items are skipped by `hir_walk_toplevel_module` (via
`visit_if_delayed`), so they were never added to `delayed_lint_items`.
This caused a debug assertion failure in `emit_ast_lowering_delayed_lints`
when an attribute like `#[deprecated]` generated a delayed lint on the item.

The FIXME in `ItemCollector::new` already noted this gap.
@RaghavenderSingh RaghavenderSingh force-pushed the fix-ice-155127-delegation-delayed-lints branch from 140188d to eed7d10 Compare April 11, 2026 08:52
@TaKO8Ki
Copy link
Copy Markdown
Member

TaKO8Ki commented Apr 11, 2026

It looks like you mentioned the wrong person.

r? @Compiler

@RaghavenderSingh
Copy link
Copy Markdown
Author

It looks like you mentioned the wrong person.

Sorry about that, thanks!

@TaKO8Ki
Copy link
Copy Markdown
Member

TaKO8Ki commented Apr 11, 2026

@RaghavenderSingh When you explicitly need to pick up reviewers, you can do like r? compiler. For more information, please refer to https://forge.rust-lang.org/triagebot/pr-assignment.html.

@RaghavenderSingh
Copy link
Copy Markdown
Author

@RaghavenderSingh When you explicitly need to pick up reviewers, you can do like r? compiler. For more information, please refer to https://forge.rust-lang.org/triagebot/pr-assignment.html.

Thanks for the tip!

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]: assertion failed: hir_items.delayed_lint_items().any(|i| i == owner_id)

3 participants