-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE: No HirId for DefId
#137708
Labels
C-bug
Category: This is a bug.
F-never_patterns
`#![feature(never_patterns)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
tidied up a bit for fewer errors: fn a() {
match 0 {
! => || {
use std::ops::Add;
0.add(1)
},
}
} |
@compiler-errors Hi errs, I've just been working on this for a while and I think I have find the solution, if you haven't started it yet, I'd like to assign it to me. If you've already started, don't mind me :) |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 28, 2025
…piler-errors unconditionally lower match arm even if it's unneeded for never pattern in match fixes rust-lang#137708 Lowering arm body is skipped when lowering match arm with never pattern, but we may need the HirId for DefId in the body in later passes. And then we got the ICE `No HirId for DefId`. Fixes this by lowering the arm body even if it's unneeded for never pattern in match, so that we can generate HirId and use it then. r? `@compiler-errors`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 28, 2025
…piler-errors unconditionally lower match arm even if it's unneeded for never pattern in match fixes rust-lang#137708 Lowering arm body is skipped when lowering match arm with never pattern, but we may need the HirId for DefId in the body in later passes. And then we got the ICE `No HirId for DefId`. Fixes this by lowering the arm body even if it's unneeded for never pattern in match, so that we can generate HirId and use it then. r? ``@compiler-errors``
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 1, 2025
Rollup merge of rust-lang#137742 - mu001999-contrib:fix-137708, r=compiler-errors unconditionally lower match arm even if it's unneeded for never pattern in match fixes rust-lang#137708 Lowering arm body is skipped when lowering match arm with never pattern, but we may need the HirId for DefId in the body in later passes. And then we got the ICE `No HirId for DefId`. Fixes this by lowering the arm body even if it's unneeded for never pattern in match, so that we can generate HirId and use it then. r? `@compiler-errors`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-never_patterns
`#![feature(never_patterns)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
snippet:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: