-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE when a function inside an extern block has a body, and that body has a trait impl
#91370
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
Labels
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
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
In one of the recent nightlies the error message has changed to
Backtrace
|
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 6, 2022
…=cjgillot Don't resolve blocks in foreign functions Although it is an error for a foreign function to have a block, it is still possible at the level of the AST. rust-lang#74204 made AST lowering skip over blocks belonging to foreign functions, since they're invalid. However, resolve still treated these blocks normally, resulting in a mismatch between the HIR and resolve, which could cause an ICE under certain circumstances. This PR changes resolve to skip over blocks belonging to foreign functions, as AST lowering does. Fixes rust-lang#91370. r? `@cjgillot`
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.
glacier
ICE tracked in rust-lang/glacier.
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.
I'm seeing an internal compiler error on the following input, found by fuzz-rustc:
Code
Error output
Affected versions: I tried nightly 2021-11-28 and stable 1.56.1 and they both ICE. In stable 1.56.1 the error message is different though, I would say it's better:
Backtrace
The text was updated successfully, but these errors were encountered: