rust/tests/rustdoc-ui/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
338 B
Rust
Raw Normal View History

2024-09-09 15:35:10 -05:00
// issue: rust-lang/rust#98250
//@ check-pass
#![feature(type_alias_impl_trait)]
mod foo {
pub type Foo = impl PartialEq<(Foo, i32)>;
fn foo() -> Foo {
super::Bar
}
}
use foo::Foo;
struct Bar;
impl PartialEq<(Foo, i32)> for Bar {
fn eq(&self, _other: &(Foo, i32)) -> bool {
true
}
}
fn main() {}