]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/expr-match-struct.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / expr-match-struct.rs
index 21b0c28495e6b93a02dfda1618cac1b6c6072f24..1b5a33dff3da0ada61007f50e2d2659ef4bc64cc 100644 (file)
@@ -13,6 +13,7 @@
 
 
 // Tests for match as expressions resulting in struct types
+#[derive(Copy)]
 struct R { i: int }
 
 fn test_rec() {
@@ -20,7 +21,7 @@ fn test_rec() {
     assert_eq!(rs.i, 100);
 }
 
-#[deriving(Show)]
+#[derive(Copy, Show)]
 enum mood { happy, sad, }
 
 impl PartialEq for mood {
@@ -31,8 +32,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(); }