rust/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs
2013-03-29 16:39:08 -07:00

13 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!(x == x);
assert!(!(x != x));
}