Skip to content

Emit fatal on invalid const args with nested defs#154595

Open
mu001999 wants to merge 1 commit intorust-lang:mainfrom
mu001999-contrib:fix/154539
Open

Emit fatal on invalid const args with nested defs#154595
mu001999 wants to merge 1 commit intorust-lang:mainfrom
mu001999-contrib:fix/154539

Conversation

@mu001999
Copy link
Copy Markdown
Contributor

@mu001999 mu001999 commented Mar 30, 2026

Fixes #154539

Invalid const args are rejected, so their surrounding HIR is not preserved. But nested defs inside them can still get created, leaving children lowered without a valid HIR parent and causing an ICE when later error handling walks HIR parents.

r? @BoxyUwU

@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 Mar 30, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 30, 2026

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 10, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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]: mgca: No HirId for DefId

3 participants