test: More run-pass test fixes
This commit is contained in:
parent
7a065f2434
commit
6084032270
29 changed files with 47 additions and 45 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ trait to_strz {
|
|||
}
|
||||
|
||||
impl ~str: to_strz {
|
||||
fn to_strz() -> ~str { self }
|
||||
fn to_strz() -> ~str { copy self }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue