summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-types/issue-63591.rs
blob: 4d2e39f4da60c788e9e625a3a62584b5daf508ac (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
// check-pass

#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]

fn main() {}

trait Bar { type Assoc; }

trait Thing {
    type Out;
    fn func() -> Self::Out;
}

struct AssocIsCopy;
impl Bar for AssocIsCopy { type Assoc = u8; }

impl Thing for AssocIsCopy {
    type Out = impl Bar<Assoc: Copy>;

    fn func() -> Self::Out {
        AssocIsCopy
    }
}