]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-inference/unbounded-associated-type.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / type-inference / unbounded-associated-type.rs
1 trait T {
2     type A;
3     fn foo(&self) -> Self::A {
4         panic!()
5     }
6 }
7
8 struct S<X>(std::marker::PhantomData<X>);
9
10 impl<X> T for S<X> {
11    type A = X;
12 }
13
14 fn main() {
15     S(std::marker::PhantomData).foo(); //~ ERROR type annotations needed
16 }