]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/issue-63591.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / associated-types / issue-63591.rs
1 // check-pass
2
3 #![feature(associated_type_bounds)]
4 #![feature(type_alias_impl_trait)]
5
6 fn main() {}
7
8 trait Bar { type Assoc; }
9
10 trait Thing {
11     type Out;
12     fn func() -> Self::Out;
13 }
14
15 struct AssocIsCopy;
16 impl Bar for AssocIsCopy { type Assoc = u8; }
17
18 impl Thing for AssocIsCopy {
19     type Out = impl Bar<Assoc: Copy>;
20
21     fn func() -> Self::Out {
22         AssocIsCopy
23     }
24 }