os-rust/compiler/rustc_hir_analysis
Guillaume Gomez 46c3c014eb
Rollup merge of #119817 - compiler-errors:normalize-opaques, r=lcnr
Remove special-casing around `AliasKind::Opaque` when structurally resolving in new solver

This fixes a few inconsistencies around where we don't eagerly resolve opaques to their (locally-defined) hidden types in the new solver. It essentially allows this code to work:
```rust
fn main() {
    type Tait = impl Sized;
    struct S {
        i: i32,
    }
    let x: Tait = S { i: 0 };
    println!("{}", x.i);
}
```

Since `Tait` is defined in `main`, we are able to poke through the type of `x` with deref.

r? lcnr
2024-01-12 15:16:56 +01:00
..
src Rollup merge of #119817 - compiler-errors:normalize-opaques, r=lcnr 2024-01-12 15:16:56 +01:00
Cargo.toml Disallow reference to static mut for expressions 2024-01-06 06:31:35 +03:00
messages.ftl Disallow reference to static mut for expressions 2024-01-06 06:31:35 +03:00
README.md rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.