1
Fork 0

librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping

This commit is contained in:
Patrick Walton 2013-02-14 11:47:00 -08:00
parent 8ec6f43d6c
commit 9143688197
583 changed files with 1115 additions and 1115 deletions

View file

@ -14,9 +14,9 @@ trait C: A { fn c(&self) -> int; }
struct S { bogus: () }
impl S: A { fn a(&self) -> int { 10 } }
impl S: B { fn b(&self) -> int { 20 } }
impl S: C { fn c(&self) -> int { 30 } }
impl A for S { fn a(&self) -> int { 10 } }
impl B for S { fn b(&self) -> int { 20 } }
impl C for S { fn c(&self) -> int { 30 } }
// Multiple type params, multiple levels of inheritance
fn f<X: A, Y: B, Z: C>(x: &X, y: &Y, z: &Z) {
@ -30,4 +30,4 @@ fn f<X: A, Y: B, Z: C>(x: &X, y: &Y, z: &Z) {
pub fn main() {
let s = &S { bogus: () };
f(s, s, s);
}
}