rust/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs
2013-05-19 08:16:02 -04:00

12 lines
154 B
Rust

#[deriving(Eq)]
enum S {
X { x: int, y: int },
Y
}
pub fn main() {
let x = X { x: 1, y: 2 };
assert_eq!(x, x);
assert!(!(x != x));
}