rust/tests/ui/missing/missing-derivable-attr.rs

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

17 lines
260 B
Rust
Raw Normal View History

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