]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-88360.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / issue-88360.rs
1 #![feature(generic_associated_types)]
2
3 trait GatTrait {
4     type Gat<'a> where Self: 'a;
5
6     fn test(&self) -> Self::Gat<'_>;
7 }
8
9 trait SuperTrait<T>
10 where
11     Self: 'static,
12     for<'a> Self: GatTrait<Gat<'a> = &'a T>,
13 {
14     fn copy(&self) -> Self::Gat<'_> where T: Copy {
15         *self.test()
16         //~^ mismatched types
17     }
18 }
19
20 fn main() {}