summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-78450.rs
blob: 2a984c1ed7133d12a6545a0e548b2a7fef284309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// check-pass

#![feature(impl_trait_in_assoc_type)]

pub trait AssociatedImpl {
    type ImplTrait;

    fn f() -> Self::ImplTrait;
}

struct S<T>(T);

trait Associated {
    type A;
}

impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
    type ImplTrait = impl core::fmt::Debug;

    fn f() -> Self::ImplTrait {
        ()
    }
}

fn main() {}