]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/expr-match-struct.rs
Switch to purely namespaced enums
[rust.git] / src / test / run-pass / expr-match-struct.rs
index 3d01c6653a7a002bc082e5dbaf22c50dfd89af0e..ea96005dc602e8434a442571c53e2ce2178d392d 100644 (file)
@@ -16,7 +16,7 @@
 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);
 }
 
@@ -31,8 +31,8 @@ fn ne(&self, other: &mood) -> bool { !(*self).eq(other) }
 }
 
 fn test_tag() {
-    let rs = match true { true => { happy } false => { sad } };
-    assert_eq!(rs, happy);
+    let rs = match true { true => { mood::happy } false => { mood::sad } };
+    assert_eq!(rs, mood::happy);
 }
 
 pub fn main() { test_rec(); test_tag(); }