]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / impl-trait / recursive-type-alias-impl-trait-declaration-too-subtle-2.rs
1 #![feature(type_alias_impl_trait)]
2
3 type Foo = impl PartialEq<(Foo, i32)>;
4
5 struct Bar;
6
7 impl PartialEq<(Foo, i32)> for Bar {
8     fn eq(&self, _other: &(Foo, i32)) -> bool {
9         true
10     }
11 }
12
13 fn foo() -> Foo {
14     //~^ ERROR can't compare `Bar` with `(Bar, i32)`
15     Bar
16 }
17
18 fn main() {}