summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-88360.rs
blob: 8ee98201aba7a79ec6624e8aa626025e403d032d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![feature(generic_associated_types)]

trait GatTrait {
    type Gat<'a> where Self: 'a;

    fn test(&self) -> Self::Gat<'_>;
}

trait SuperTrait<T>
where
    Self: 'static,
    for<'a> Self: GatTrait<Gat<'a> = &'a T>,
{
    fn copy(&self) -> Self::Gat<'_> where T: Copy {
        *self.test()
        //~^ mismatched types
    }
}

fn main() {}