about summary refs log tree commit diff
path: root/src/test/run-pass/expr-if-struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass/expr-if-struct.rs')
-rw-r--r--src/test/run-pass/expr-if-struct.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs
index 62994068a9e..f1457829d03 100644
--- a/src/test/run-pass/expr-if-struct.rs
+++ b/src/test/run-pass/expr-if-struct.rs
@@ -14,20 +14,17 @@
 
 // Tests for if as expressions returning nominal types
 
+#[derive(Copy)]
 struct I { i: int }
 
-impl Copy for I {}
-
 fn test_rec() {
     let rs = if true { I {i: 100} } else { I {i: 101} };
     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)