]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-78450.rs
Loop over all opaque types instead of looking at just the first one with the same...
[rust.git] / src / test / ui / type-alias-impl-trait / issue-78450.rs
1 // check-pass
2
3 #![feature(min_type_alias_impl_trait)]
4 #![feature(type_alias_impl_trait)]
5 //~^ WARNING: the feature `type_alias_impl_trait` is incomplete
6
7 pub trait AssociatedImpl {
8     type ImplTrait;
9
10     fn f() -> Self::ImplTrait;
11 }
12
13 struct S<T>(T);
14
15 trait Associated {
16     type A;
17 }
18
19 impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
20     type ImplTrait = impl core::fmt::Debug;
21
22     fn f() -> Self::ImplTrait {
23         ()
24     }
25 }
26
27 fn main() {}