-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: is not an ADT
#121151
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
F-unnamed_fields
`#![feature(unnamed_fields)]`
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
matthiaskrgr
added
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.
C-bug
Category: This is a bug.
labels
Feb 15, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Feb 15, 2024
Actually nvm, don't want to work on this. @frank-king: heads up that this code is broken. It does not verify that the unnamed field is an ADT: #![feature(unnamed_fields)]
#[repr(C)]
struct D {
_: i32,
}
fn main() {} |
jieyouxu
added
A-type-system
Area: Type system
F-unnamed_fields
`#![feature(unnamed_fields)]`
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Feb 15, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 17, 2024
…s, r=compiler-errors Add more checks for `unnamed_fields` during HIR analysis Fixes rust-lang#121151 I also found that we don't prevent enums here so ```rs #[repr(C)] #[derive(Debug)] enum A { #[default] B, C, } #[repr(C)] #[derive(Debug)] struct D { _: A, } ``` leads to an ICE on an `self.is_struct() || self.is_union()` assertion, so fixed that too.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Feb 17, 2024
…s, r=compiler-errors Add more checks for `unnamed_fields` during HIR analysis Fixes rust-lang#121151 I also found that we don't prevent enums here so ```rs #[repr(C)] #[derive(Debug)] enum A { #[default] B, C, } #[repr(C)] #[derive(Debug)] struct D { _: A, } ``` leads to an ICE on an `self.is_struct() || self.is_union()` assertion, so fixed that too.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 18, 2024
Rollup merge of rust-lang#121198 - clubby789:unnamed-fields-hir-checks, r=compiler-errors Add more checks for `unnamed_fields` during HIR analysis Fixes rust-lang#121151 I also found that we don't prevent enums here so ```rs #[repr(C)] #[derive(Debug)] enum A { #[default] B, C, } #[repr(C)] #[derive(Debug)] struct D { _: A, } ``` leads to an ICE on an `self.is_struct() || self.is_union()` assertion, so fixed that too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
F-unnamed_fields
`#![feature(unnamed_fields)]`
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.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: