Rollup merge of #133558 - compiler-errors:structurally-resolve-probe-adt, r=lcnr

Structurally resolve in `probe_adt`

fixes #132320

r? lcnr
This commit is contained in:
Matthias Krüger 2024-12-03 17:27:07 +01:00 committed by GitHub
commit 49df325cb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 16 deletions

View file

@ -0,0 +1,15 @@
//@ check-pass
//@ compile-flags: -Znext-solver
trait Mirror {
type Assoc;
}
impl<T> Mirror for T {
type Assoc = T;
}
type Foo<T> = <Option<T> as Mirror>::Assoc;
fn main() {
let x = Foo::<i32>::None;
}