]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/issue-63591.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / issue-63591.rs
1 // check-pass
2
3 #![feature(associated_type_bounds)]
4 // revisions: min_tait full_tait
5 #![feature(min_type_alias_impl_trait)]
6 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
7 //[full_tait]~^ WARN incomplete
8
9 fn main() {}
10
11 trait Bar { type Assoc; }
12
13 trait Thing {
14     type Out;
15     fn func() -> Self::Out;
16 }
17
18 struct AssocIsCopy;
19 impl Bar for AssocIsCopy { type Assoc = u8; }
20
21 impl Thing for AssocIsCopy {
22     type Out = impl Bar<Assoc: Copy>;
23
24     fn func() -> Self::Out {
25         AssocIsCopy
26     }
27 }