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.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs
index 758d726851d..c95ca3fff8c 100644
--- a/src/test/run-pass/expr-if-struct.rs
+++ b/src/test/run-pass/expr-if-struct.rs
@@ -16,6 +16,8 @@
 
 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);
@@ -24,6 +26,8 @@ fn test_rec() {
 #[deriving(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)