2013-03-20 10:42:59 -05:00
|
|
|
#[deriving(Eq)]
|
2012-12-10 15:04:04 -06:00
|
|
|
enum S {
|
|
|
|
X { x: int, y: int },
|
|
|
|
Y
|
|
|
|
}
|
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2012-12-10 15:04:04 -06:00
|
|
|
let x = X { x: 1, y: 2 };
|
2013-05-18 21:02:45 -05:00
|
|
|
assert_eq!(x, x);
|
2013-03-28 20:39:09 -05:00
|
|
|
assert!(!(x != x));
|
2012-12-10 15:04:04 -06:00
|
|
|
}
|