17 lines
188 B
Rust
17 lines
188 B
Rust
#[deriving_eq]
|
|
enum Foo {
|
|
Bar,
|
|
Baz,
|
|
Boo
|
|
}
|
|
|
|
fn main() {
|
|
let a = Bar;
|
|
let b = Bar;
|
|
assert a == b;
|
|
assert !(a != b);
|
|
assert a.eq(&b);
|
|
assert !a.ne(&b);
|
|
}
|
|
|