]> 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 8512cf63cddddef7927f4fc5c8fd07f2e935a304..1b5a33dff3da0ada61007f50e2d2659ef4bc64cc 100644 (file)
 
 
 // Tests for match as expressions resulting in struct types
+#[derive(Copy)]
 struct R { i: int }
 
-impl Copy for R {}
-
 fn test_rec() {
     let rs = match true { true => R {i: 100}, _ => panic!() };
     assert_eq!(rs.i, 100);
 }
 
-#[derive(Show)]
+#[derive(Copy, Show)]
 enum mood { happy, sad, }
 
-impl Copy for mood {}
-
 impl PartialEq for mood {
     fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)