]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / associated-impl-trait-type-trivial.rs
1 #![feature(type_alias_impl_trait)]
2 // build-pass (FIXME(62277): could be check-pass?)
3
4 trait Bar {}
5 struct Dummy;
6 impl Bar for Dummy {}
7
8 trait Foo {
9     type Assoc: Bar;
10     fn foo() -> Self::Assoc;
11 }
12
13 impl Foo for i32 {
14     type Assoc = impl Bar;
15     fn foo() -> Self::Assoc {
16         Dummy
17     }
18 }
19
20 fn main() {}