]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / recursive-type-alias-impl-trait-declaration-too-subtle.rs
1 #![feature(type_alias_impl_trait)]
2
3 mod a {
4     type Foo = impl PartialEq<(Foo, i32)>;
5
6     struct Bar;
7
8     impl PartialEq<(Bar, i32)> for Bar {
9         fn eq(&self, _other: &(Foo, i32)) -> bool {
10             true
11         }
12     }
13 }
14
15 mod b {
16     type Foo = impl PartialEq<(Foo, i32)>;
17
18     struct Bar;
19
20     impl PartialEq<(Foo, i32)> for Bar {
21         //~^ ERROR cannot implement trait on type alias impl trait
22         fn eq(&self, _other: &(Bar, i32)) -> bool {
23             true
24         }
25     }
26 }
27
28 fn main() {}