test: More run-pass test fixes

This commit is contained in:
Patrick Walton 2012-12-05 16:51:32 -08:00
parent 7a065f2434
commit 6084032270
29 changed files with 47 additions and 45 deletions

View file

@ -13,7 +13,7 @@ struct cat {
}
impl cat : ToStr {
pure fn to_str() -> ~str { self.name }
pure fn to_str() -> ~str { copy self.name }
}
priv impl cat {

View file

@ -12,5 +12,5 @@ type header_map = HashMap<~str, @DVec<@~str>>;
// the unused ty param is necessary so this gets monomorphized
fn request<T: Copy>(req: header_map) {
let _x = *(*req.get(~"METHOD"))[0u];
let _x = *(copy *req.get(~"METHOD"))[0u];
}

View file

@ -6,5 +6,5 @@ trait to_strz {
}
impl ~str: to_strz {
fn to_strz() -> ~str { self }
fn to_strz() -> ~str { copy self }
}

View file

@ -8,7 +8,7 @@ pub struct MyInt {
}
pub impl MyInt : Add<MyInt, MyInt> {
pure fn add(other: &MyInt) -> MyInt { mi(self.val + other.val) }
pure fn add(&self, other: &MyInt) -> MyInt { mi(self.val + other.val) }
}
pub impl MyInt : Sub<MyInt, MyInt> {