mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
cb58668748
This reverts commit 0c0dfb88ee
.
49 lines
978 B
Rust
49 lines
978 B
Rust
//@ check-pass
|
|
//@ edition:2021
|
|
|
|
struct Dog;
|
|
|
|
fn main() {
|
|
impl PartialEq<()> for Dog {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &()) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl PartialEq<()> for &Dog {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &()) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl PartialEq<Dog> for () {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &Dog) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl PartialEq<&Dog> for () {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &&Dog) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl PartialEq<Dog> for &Dog {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &Dog) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl PartialEq<&Dog> for &Dog {
|
|
//~^ WARN non-local `impl` definition
|
|
fn eq(&self, _: &&Dog) -> bool {
|
|
todo!()
|
|
}
|
|
}
|
|
}
|