]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-78450.rs
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
[rust.git] / tests / ui / type-alias-impl-trait / issue-78450.rs
1 // check-pass
2
3 #![feature(type_alias_impl_trait)]
4
5 pub trait AssociatedImpl {
6     type ImplTrait;
7
8     fn f() -> Self::ImplTrait;
9 }
10
11 struct S<T>(T);
12
13 trait Associated {
14     type A;
15 }
16
17 impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
18     type ImplTrait = impl core::fmt::Debug;
19
20     fn f() -> Self::ImplTrait {
21         ()
22     }
23 }
24
25 fn main() {}