]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / associated-type-alias-impl-trait.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5 // build-pass (FIXME(62277): could be check-pass?)
6
7 trait Bar {}
8 struct Dummy;
9 impl Bar for Dummy {}
10
11 trait Foo {
12 type Assoc: Bar;
13 fn foo() -> Self::Assoc;
14 fn bar() -> Self::Assoc;
15 }
16
17 type Helper = impl Bar;
18
19 impl Foo for i32 {
20 type Assoc = Helper;
21 fn foo() -> Helper {
22 Dummy
23 }
24 fn bar() -> Helper {
25 Dummy
26 }
27 }
28
29 fn main() {}