rust/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs

12 lines
153 B
Rust
Raw Normal View History

#[deriving(Eq)]
enum S {
X { x: int, y: int },
Y
}
pub fn main() {
let x = X { x: 1, y: 2 };
2013-03-29 01:39:09 +00:00
assert!(x == x);
assert!(!(x != x));
}