mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
17 lines
260 B
Rust
17 lines
260 B
Rust
trait MyEq {
|
|
fn eq(&self, other: &Self) -> bool;
|
|
}
|
|
|
|
struct A {
|
|
x: isize
|
|
}
|
|
|
|
impl MyEq for isize {
|
|
fn eq(&self, other: &isize) -> bool { *self == *other }
|
|
}
|
|
|
|
impl MyEq for A {} //~ ERROR not all trait items implemented, missing: `eq`
|
|
|
|
fn main() {
|
|
}
|