-
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: expected type differs from actual type
#125842
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
with debug assertions: Backtrace
|
without: --> Backtrace
|
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jun 5, 2024
check_expr_struct_fields: taint context with errors if struct definit… Taint errors while checking `struct { field: 1 }` below if struct definition has duplicated fields so that we don't pass it to const eval. fixes rust-lang#125842, fixes rust-lang#124464, fixes rust-lang#124552 ```rust struct Struct { field: Option<u8>, field: u8, } static STATIC: Struct = Struct { field: 1, }; pub fn main() {} ``` (This was rust-lang#125947 but i messed something up, sorry) r? `@compiler-errors`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 6, 2024
Rollup merge of rust-lang#126045 - olafes:master, r=compiler-errors check_expr_struct_fields: taint context with errors if struct definit… Taint errors while checking `struct { field: 1 }` below if struct definition has duplicated fields so that we don't pass it to const eval. fixes rust-lang#125842, fixes rust-lang#124464, fixes rust-lang#124552 ```rust struct Struct { field: Option<u8>, field: u8, } static STATIC: Struct = Struct { field: 1, }; pub fn main() {} ``` (This was rust-lang#125947 but i messed something up, sorry) r? ``@compiler-errors``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
The text was updated successfully, but these errors were encountered: