about summary refs log tree commit diff
path: root/tests/ui/associated-types/issue-63591.rs
blob: 52464d94a23017b35c5d84fe3d82d04b2cf43061 (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
26
27
//@ check-pass

#![feature(impl_trait_in_assoc_type)]

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
    }
}