12 lines
154 B
Rust
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));
|
|
}
|