]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-inference/unbounded-associated-type.rs
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / 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 }