mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
18 lines
257 B
Rust
18 lines
257 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
#[derive(PartialEq, Debug)]
|
|
enum Foo {
|
|
Bar,
|
|
Baz,
|
|
Boo
|
|
}
|
|
|
|
pub fn main() {
|
|
let a = Foo::Bar;
|
|
let b = Foo::Bar;
|
|
assert_eq!(a, b);
|
|
assert!(!(a != b));
|
|
assert!(a.eq(&b));
|
|
assert!(!a.ne(&b));
|
|
}
|