]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/expr-match-struct.rs
rollup merge of #18373 : steveklabnik/gh18288
[rust.git] / src / test / run-pass / expr-match-struct.rs
index 66ab591bb524287a39569c84568d82b541f62648..21b0c28495e6b93a02dfda1618cac1b6c6072f24 100644 (file)
 struct R { i: int }
 
 fn test_rec() {
-    let rs = match true { true => R {i: 100}, _ => fail!() };
+    let rs = match true { true => R {i: 100}, _ => panic!() };
     assert_eq!(rs.i, 100);
 }
 
+#[deriving(Show)]
 enum mood { happy, sad, }
 
-impl Eq for mood {
+impl PartialEq for mood {
     fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }