]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/associated-impl-trait-type.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / impl-trait / associated-impl-trait-type.rs
CommitLineData
6a06907d
XL
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
416331ca 5// build-pass (FIXME(62277): could be check-pass?)
1a4d82fc 6
8faf50e0
XL
7trait Bar {}
8struct Dummy;
9impl Bar for Dummy {}
94b46f34 10
8faf50e0
XL
11trait Foo {
12 type Assoc: Bar;
13 fn foo() -> Self::Assoc;
14 fn bar() -> Self::Assoc;
15}
94b46f34 16
8faf50e0 17impl Foo for i32 {
416331ca 18 type Assoc = impl Bar;
8faf50e0
XL
19 fn foo() -> Self::Assoc {
20 Dummy
21 }
22 fn bar() -> Self::Assoc {
23 Dummy
24 }
83c7162d 25}
9e0c209e
SL
26
27fn main() {}