Change 'print(fmt!(...))' to printf!/printfln! in src/test/
This commit is contained in:
parent
d047cf1ec6
commit
206ae5752e
63 changed files with 98 additions and 102 deletions
|
|
@ -18,7 +18,7 @@ struct Foo {
|
|||
|
||||
impl Foo {
|
||||
pub fn printme(&mut self) {
|
||||
io::println(fmt!("%d", self.x));
|
||||
printfln!("%d", self.x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ fn a() -> &int {
|
|||
|
||||
fn main() {
|
||||
let fifth = a();
|
||||
println(fmt!("%d", *fifth));
|
||||
printfln!("%d", *fifth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ fn main() {
|
|||
let u = Thing {x: 2};
|
||||
let _v = u.mul(&3); // This is ok
|
||||
let w = u * 3; //~ ERROR binary operation * cannot be applied to type `Thing`
|
||||
println(fmt!("%i", w.x));
|
||||
printfln!("%i", w.x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ fn f<'r, T>(v: &'r T) -> &'r fn()->T { id::<&'r fn()->T>(|| *v) } //~ ERROR cann
|
|||
|
||||
fn main() {
|
||||
let v = &5;
|
||||
println(fmt!("%d", f(v)()));
|
||||
printfln!("%d", f(v)());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fn innocent_looking_victim() {
|
|||
match x {
|
||||
Some(ref msg) => {
|
||||
(f.c)(f, true);
|
||||
println(fmt!("%?", msg));
|
||||
printfln!(msg);
|
||||
},
|
||||
None => fail!("oops"),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ struct Foo(int, int);
|
|||
fn main() {
|
||||
let x = Foo(1, 2);
|
||||
match x { //~ ERROR non-exhaustive
|
||||
Foo(1, b) => println(fmt!("%d", b)),
|
||||
Foo(2, b) => println(fmt!("%d", b))
|
||||
Foo(1, b) => printfln!("%d", b),
|
||||
Foo(2, b) => printfln!("%d", b)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue