rust/tests/ui/deriving/deriving-via-extension-c-enum.rs
2023-01-11 09:32:08 +00:00

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));
}