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

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