mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
3121a5ca3b
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 #125842, fixes #124464, fixes #124552
```rust
struct Struct {
field: Option<u8>,
field: u8,
}
static STATIC: Struct = Struct {
field: 1,
};
pub fn main() {}
```
(This was #125947 but i messed something up, sorry)
r? ``@compiler-errors``