mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
18 lines
256 B
Rust
18 lines
256 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));
|
|
}
|