]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/expr-match-struct.rs
auto merge of #19568 : barosl/rust/enum-struct-variants-ice, r=alexcrichton
[rust.git] / src / test / run-pass / expr-match-struct.rs
index ea96005dc602e8434a442571c53e2ce2178d392d..83101a3d2cc3a2130e3e5364aaeb1fc59d9858dc 100644 (file)
@@ -15,6 +15,8 @@
 // Tests for match as expressions resulting in struct types
 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);
@@ -23,6 +25,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)