2012-11-13 19:08:01 -08:00
|
|
|
trait MyEq {
|
2013-03-22 11:23:21 -07:00
|
|
|
fn eq(&self, other: &Self) -> bool;
|
2012-11-13 19:08:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
struct A {
|
2015-01-08 21:54:35 +11:00
|
|
|
x: isize
|
2012-11-13 19:08:01 -08:00
|
|
|
}
|
|
|
|
|
2015-01-08 21:54:35 +11:00
|
|
|
impl MyEq for isize {
|
|
|
|
fn eq(&self, other: &isize) -> bool { *self == *other }
|
2012-11-13 19:08:01 -08:00
|
|
|
}
|
|
|
|
|
2014-08-05 19:44:21 -07:00
|
|
|
impl MyEq for A {} //~ ERROR not all trait items implemented, missing: `eq`
|
2012-11-13 19:08:01 -08:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|