]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.rs
New upstream version 1.62.1+dfsg1
[rustc.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() {}