rust/src/test/ui/missing/missing-derivable-attr.rs
2018-12-25 21:08:33 -07:00

16 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() {
}