// 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)