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