diff --git a/src/test/run-pass/borrowck-preserve-box-in-discr.rs b/src/test/run-pass/borrowck-preserve-box-in-discr.rs
index 5ed78488b356..c65472ec894f 100644
--- a/src/test/run-pass/borrowck-preserve-box-in-discr.rs
+++ b/src/test/run-pass/borrowck-preserve-box-in-discr.rs
@@ -2,8 +2,8 @@
fn main() {
let mut x = @{f: ~3};
- match *x {
- {f: b_x} => {
+ match x {
+ @{f: b_x} => {
assert *b_x == 3;
assert ptr::addr_of(&(*x.f)) == ptr::addr_of(&(*b_x));
@@ -14,4 +14,4 @@ fn main() {
assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(*b_x));
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/run-pass/monad.rs b/src/test/run-pass/monad.rs
index ddfc29fc8d8d..af4be894f36e 100644
--- a/src/test/run-pass/monad.rs
+++ b/src/test/run-pass/monad.rs
@@ -20,7 +20,7 @@ trait option_monad {
impl Option: option_monad {
fn bind(f: fn(A) -> Option) -> Option {
match self {
- Some(a) => { f(a) }
+ Some(ref a) => { f(*a) }
None => { None }
}
}
diff --git a/src/test/run-pass/size-and-align.rs b/src/test/run-pass/size-and-align.rs
index 992be4165989..b20e6efa8581 100644
--- a/src/test/run-pass/size-and-align.rs
+++ b/src/test/run-pass/size-and-align.rs
@@ -6,7 +6,7 @@ enum clam { a(T, int), b, }
fn uhoh(v: ~[clam]) {
match v[1] {
- a::(t, u) => { debug!("incorrect"); log(debug, u); fail; }
+ a::(ref t, ref u) => { debug!("incorrect"); log(debug, u); fail; }
b:: => { debug!("correct"); }
}
}
diff --git a/src/test/run-pass/trait-cast.rs b/src/test/run-pass/trait-cast.rs
index 5fe4d53497f8..b307c6e7e7eb 100644
--- a/src/test/run-pass/trait-cast.rs
+++ b/src/test/run-pass/trait-cast.rs
@@ -15,7 +15,7 @@ impl Option: to_str {
fn to_str() -> ~str {
match self {
None => { ~"none" }
- Some(t) => { ~"some(" + t.to_str() + ~")" }
+ Some(ref t) => { ~"some(" + t.to_str() + ~")" }
}
}
}
diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs
index f74d67258368..c8d9ea14d541 100644
--- a/src/test/run-pass/while-prelude-drop.rs
+++ b/src/test/run-pass/while-prelude-drop.rs
@@ -1,26 +1,7 @@
+#[deriving_eq]
enum t { a, b(~str), }
-impl t : cmp::Eq {
- pure fn eq(&self, other: &t) -> bool {
- match *self {
- a => {
- match (*other) {
- a => true,
- b(_) => false
- }
- }
- b(s0) => {
- match (*other) {
- a => false,
- b(s1) => s0 == s1
- }
- }
- }
- }
- pure fn ne(&self, other: &t) -> bool { !(*self).eq(other) }
-}
-
fn make(i: int) -> t {
if i > 10 { return a; }
let mut s = ~"hello";