X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Frun-pass%2Fexpr-match-struct.rs;h=1b5a33dff3da0ada61007f50e2d2659ef4bc64cc;hb=bff462302b3e0a8f68c14cad2806c7ff5005364e;hp=83101a3d2cc3a2130e3e5364aaeb1fc59d9858dc;hpb=2593070d57cb0b4cdc626cfc2924d6c590b0f9a8;p=rust.git diff --git a/src/test/run-pass/expr-match-struct.rs b/src/test/run-pass/expr-match-struct.rs index 83101a3d2cc..1b5a33dff3d 100644 --- a/src/test/run-pass/expr-match-struct.rs +++ b/src/test/run-pass/expr-match-struct.rs @@ -13,20 +13,17 @@ // 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); } -#[deriving(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)