]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/normalize-self-ty.rs
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / nll / user-annotations / normalize-self-ty.rs
1 // Regression test for #55183: check a case where the self type from
2 // the inherent impl requires normalization to be equal to the
3 // user-provided type.
4 //
5 // check-pass
6
7 trait Mirror {
8     type Me;
9 }
10
11 impl<T> Mirror for T {
12     type Me = T;
13 }
14
15 struct Foo<A, B>(A, B);
16
17 impl<A> Foo<A, <A as Mirror>::Me> {
18     fn m(_: A) { }
19 }
20
21 fn main() {
22     <Foo<&'static u32, &u32>>::m(&22);
23 }