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

13 lines
154 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-28 20:39:09 -05:00
assert!(x == x);
assert!(!(x != x));
}