summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/nested-return-type3-tait2.rs
blob: 56778ed90dc7b46b7fef77a686e207363cff3bd2 (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(type_alias_impl_trait)]

trait Duh {}

impl Duh for i32 {}

trait Trait {
    type Assoc: Duh;
}

impl<F: Duh> Trait for F {
    type Assoc = F;
}

type Sendable = impl Send;
type Traitable = impl Trait<Assoc = Sendable>;

fn foo() -> Traitable {
    42
}

fn main() {
}