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