diff --git a/src/test/compile-fail/assign-imm-local-twice.rs b/src/test/compile-fail/assign-imm-local-twice.rs index 7eeaa9435def..f60b67cf8420 100644 --- a/src/test/compile-fail/assign-imm-local-twice.rs +++ b/src/test/compile-fail/assign-imm-local-twice.rs @@ -11,9 +11,9 @@ fn test() { let v: int; v = 1; //~ NOTE prior assignment occurs here - info!("v=%d", v); + info2!("v={}", v); v = 2; //~ ERROR re-assignment of immutable variable - info!("v=%d", v); + info2!("v={}", v); } fn main() { diff --git a/src/test/compile-fail/assign-to-method.rs b/src/test/compile-fail/assign-to-method.rs index f300bd51b24e..32f27f64f54d 100644 --- a/src/test/compile-fail/assign-to-method.rs +++ b/src/test/compile-fail/assign-to-method.rs @@ -27,5 +27,5 @@ fn cat(in_x : uint, in_y : int) -> cat { fn main() { let nyan : cat = cat(52u, 99); - nyan.speak = || info!("meow"); //~ ERROR attempted to take value of method + nyan.speak = || info2!("meow"); //~ ERROR attempted to take value of method } diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs index e1ad19e32bdd..ae911b541079 100644 --- a/src/test/compile-fail/autoderef-full-lval.rs +++ b/src/test/compile-fail/autoderef-full-lval.rs @@ -21,11 +21,11 @@ fn main() { let a: clam = clam{x: @1, y: @2}; let b: clam = clam{x: @10, y: @20}; let z: int = a.x + b.y; //~ ERROR binary operation + cannot be applied to type `@int` - info!(z); + info2!("{:?}", z); assert_eq!(z, 21); let forty: fish = fish{a: @40}; let two: fish = fish{a: @2}; let answer: int = forty.a + two.a; //~ ERROR binary operation + cannot be applied to type `@int` - info!(answer); + info2!("{:?}", answer); assert_eq!(answer, 42); } diff --git a/src/test/compile-fail/bad-bang-ann.rs b/src/test/compile-fail/bad-bang-ann.rs index 2ffb5dd29066..a9e9ed64d9a3 100644 --- a/src/test/compile-fail/bad-bang-ann.rs +++ b/src/test/compile-fail/bad-bang-ann.rs @@ -12,7 +12,7 @@ // Tests that a function with a ! annotation always actually fails fn bad_bang(i: uint) -> ! { - if i < 0u { } else { fail!(); } + if i < 0u { } else { fail2!(); } //~^ ERROR expected `!` but found `()` } diff --git a/src/test/compile-fail/bad-const-type.rs b/src/test/compile-fail/bad-const-type.rs index 5045c87c2f3a..095a85ab21e9 100644 --- a/src/test/compile-fail/bad-const-type.rs +++ b/src/test/compile-fail/bad-const-type.rs @@ -11,4 +11,4 @@ // error-pattern:expected `~str` but found `int` static i: ~str = 10i; -fn main() { info!(i); } +fn main() { info2!("{:?}", i); } diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs index 3d1cca46085d..262248f9dc3b 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs @@ -12,7 +12,7 @@ struct X { x: () } impl Drop for X { fn drop(&mut self) { - error!("destructor runs"); + error2!("destructor runs"); } } @@ -20,6 +20,6 @@ fn main() { let x = Some(X { x: () }); match x { Some(ref _y @ _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern - None => fail!() + None => fail2!() } } diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs index a1803a621a53..bf665e6fb60b 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs @@ -12,7 +12,7 @@ struct X { x: (), } impl Drop for X { fn drop(&mut self) { - error!("destructor runs"); + error2!("destructor runs"); } } @@ -20,6 +20,6 @@ fn main() { let x = Some((X { x: () }, X { x: () })); match x { Some((ref _y, _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern - None => fail!() + None => fail2!() } } diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs index 34a9c0b8fc26..fcb9dbb300c8 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs @@ -12,7 +12,7 @@ struct X { x: (), } impl Drop for X { fn drop(&mut self) { - error!("destructor runs"); + error2!("destructor runs"); } } @@ -22,6 +22,6 @@ fn main() { let x = some2(X { x: () }, X { x: () }); match x { some2(ref _y, _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern - none2 => fail!() + none2 => fail2!() } } diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs index 2aa3379993b7..19076181c512 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs @@ -12,7 +12,7 @@ struct X { x: (), } impl Drop for X { fn drop(&mut self) { - error!("destructor runs"); + error2!("destructor runs"); } } @@ -20,6 +20,6 @@ fn main() { let x = Some((X { x: () }, X { x: () })); match x { Some((_y, ref _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern - None => fail!() + None => fail2!() } } diff --git a/src/test/compile-fail/bind-by-move-no-guards.rs b/src/test/compile-fail/bind-by-move-no-guards.rs index 348781d74977..5c0274b03d09 100644 --- a/src/test/compile-fail/bind-by-move-no-guards.rs +++ b/src/test/compile-fail/bind-by-move-no-guards.rs @@ -15,8 +15,8 @@ fn main() { let x = Some(p); c.send(false); match x { - Some(z) if z.recv() => { fail!() }, //~ ERROR cannot bind by-move into a pattern guard + Some(z) if z.recv() => { fail2!() }, //~ ERROR cannot bind by-move into a pattern guard Some(z) => { assert!(!z.recv()); }, - None => fail!() + None => fail2!() } } diff --git a/src/test/compile-fail/bind-by-move-no-sub-bindings.rs b/src/test/compile-fail/bind-by-move-no-sub-bindings.rs index 7143ce0252b7..9b7cc41e5c87 100644 --- a/src/test/compile-fail/bind-by-move-no-sub-bindings.rs +++ b/src/test/compile-fail/bind-by-move-no-sub-bindings.rs @@ -12,7 +12,7 @@ struct X { x: (), } impl Drop for X { fn drop(&mut self) { - error!("destructor runs"); + error2!("destructor runs"); } } @@ -20,6 +20,6 @@ fn main() { let x = Some(X { x: () }); match x { Some(_y @ ref _z) => { }, //~ ERROR cannot bind by-move with sub-bindings - None => fail!() + None => fail2!() } } diff --git a/src/test/compile-fail/block-arg-as-stmt-with-value.rs b/src/test/compile-fail/block-arg-as-stmt-with-value.rs index d2366c2b5bc5..294c45093dd6 100644 --- a/src/test/compile-fail/block-arg-as-stmt-with-value.rs +++ b/src/test/compile-fail/block-arg-as-stmt-with-value.rs @@ -17,6 +17,6 @@ fn compute1() -> float { fn main() { let x = compute1(); - info!(x); + info2!("{:?}", x); assert_eq!(x, -4f); } diff --git a/src/test/compile-fail/block-coerce-no.rs b/src/test/compile-fail/block-coerce-no.rs index df9eb9fdda69..379b71f74117 100644 --- a/src/test/compile-fail/block-coerce-no.rs +++ b/src/test/compile-fail/block-coerce-no.rs @@ -21,6 +21,6 @@ fn coerce(b: &fn()) -> extern fn() { fn main() { let i = 8; - let f = coerce(|| error!(i) ); + let f = coerce(|| error2!("{:?}", i) ); f(); } diff --git a/src/test/compile-fail/bogus-tag.rs b/src/test/compile-fail/bogus-tag.rs index 63d12b72cc63..c14989fcbbb6 100644 --- a/src/test/compile-fail/bogus-tag.rs +++ b/src/test/compile-fail/bogus-tag.rs @@ -17,7 +17,7 @@ enum color { rgb(int, int, int), rgba(int, int, int, int), } fn main() { let red: color = rgb(255, 0, 0); match red { - rgb(r, g, b) => { info!("rgb"); } - hsl(h, s, l) => { info!("hsl"); } + rgb(r, g, b) => { info2!("rgb"); } + hsl(h, s, l) => { info2!("hsl"); } } } diff --git a/src/test/compile-fail/borrowck-anon-fields-variant.rs b/src/test/compile-fail/borrowck-anon-fields-variant.rs index da0a9323d2c8..ce3aff59d7a6 100644 --- a/src/test/compile-fail/borrowck-anon-fields-variant.rs +++ b/src/test/compile-fail/borrowck-anon-fields-variant.rs @@ -10,12 +10,12 @@ fn distinct_variant() { let a = match y { Y(ref mut a, _) => a, - X => fail!() + X => fail2!() }; let b = match y { Y(_, ref mut b) => b, - X => fail!() + X => fail2!() }; *a += 1; @@ -27,12 +27,12 @@ fn same_variant() { let a = match y { Y(ref mut a, _) => a, - X => fail!() + X => fail2!() }; let b = match y { Y(ref mut b, _) => b, //~ ERROR cannot borrow - X => fail!() + X => fail2!() }; *a += 1; diff --git a/src/test/compile-fail/borrowck-assign-comp-idx.rs b/src/test/compile-fail/borrowck-assign-comp-idx.rs index 0256c88b01d5..8c4d681d9835 100644 --- a/src/test/compile-fail/borrowck-assign-comp-idx.rs +++ b/src/test/compile-fail/borrowck-assign-comp-idx.rs @@ -21,7 +21,7 @@ fn a() { p[0] = 5; //~ ERROR cannot assign - info!("%d", *q); + info2!("{}", *q); } fn borrow(_x: &[int], _f: &fn()) {} diff --git a/src/test/compile-fail/borrowck-autoref-3261.rs b/src/test/compile-fail/borrowck-autoref-3261.rs index 4bbd1b0decf5..487a16c1836d 100644 --- a/src/test/compile-fail/borrowck-autoref-3261.rs +++ b/src/test/compile-fail/borrowck-autoref-3261.rs @@ -24,7 +24,7 @@ fn main() { x = X(Left((0,0))); //~ ERROR cannot assign to `x` (*f)() }, - _ => fail!() + _ => fail2!() } } } diff --git a/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs b/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs index 1051c5829ec3..c7cb9ce27f2b 100644 --- a/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs +++ b/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs @@ -18,7 +18,7 @@ struct Bar { int2: int, } -fn make_foo() -> ~Foo { fail!() } +fn make_foo() -> ~Foo { fail2!() } fn borrow_same_field_twice_mut_mut() { let mut foo = make_foo(); diff --git a/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs b/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs index cdcf50c906e3..d01fd86f2886 100644 --- a/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs +++ b/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs @@ -18,7 +18,7 @@ struct Bar { int2: int, } -fn make_foo() -> Foo { fail!() } +fn make_foo() -> Foo { fail2!() } fn borrow_same_field_twice_mut_mut() { let mut foo = make_foo(); diff --git a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs index 1c725a0dd0e0..918e06fad07d 100644 --- a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs +++ b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs @@ -16,7 +16,7 @@ struct defer<'self> { impl<'self> Drop for defer<'self> { fn drop(&mut self) { unsafe { - error!("%?", self.x); + error2!("{:?}", self.x); } } } diff --git a/src/test/compile-fail/borrowck-lend-flow-if.rs b/src/test/compile-fail/borrowck-lend-flow-if.rs index 563f63b98be0..1058211a6e45 100644 --- a/src/test/compile-fail/borrowck-lend-flow-if.rs +++ b/src/test/compile-fail/borrowck-lend-flow-if.rs @@ -16,9 +16,9 @@ fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} -fn cond() -> bool { fail!() } -fn for_func(_f: &fn() -> bool) { fail!() } -fn produce() -> T { fail!(); } +fn cond() -> bool { fail2!() } +fn for_func(_f: &fn() -> bool) { fail2!() } +fn produce() -> T { fail2!(); } fn inc(v: &mut ~int) { *v = ~(**v + 1); diff --git a/src/test/compile-fail/borrowck-lend-flow-loop.rs b/src/test/compile-fail/borrowck-lend-flow-loop.rs index 869ef0591e4b..fff8a2584797 100644 --- a/src/test/compile-fail/borrowck-lend-flow-loop.rs +++ b/src/test/compile-fail/borrowck-lend-flow-loop.rs @@ -16,8 +16,8 @@ fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} -fn cond() -> bool { fail!() } -fn produce() -> T { fail!(); } +fn cond() -> bool { fail2!() } +fn produce() -> T { fail2!(); } fn inc(v: &mut ~int) { *v = ~(**v + 1); diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index d5c5597e57fc..b6a30da46f83 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -13,7 +13,7 @@ #[allow(unused_variable)]; #[allow(dead_assignment)]; -fn cond() -> bool { fail!() } +fn cond() -> bool { fail2!() } fn link<'a>(v: &'a uint, w: &mut &'a uint) -> bool { *w = v; true } fn separate_arms() { diff --git a/src/test/compile-fail/borrowck-lend-flow.rs b/src/test/compile-fail/borrowck-lend-flow.rs index ea840a28b4e6..c51d6117e5ca 100644 --- a/src/test/compile-fail/borrowck-lend-flow.rs +++ b/src/test/compile-fail/borrowck-lend-flow.rs @@ -16,9 +16,9 @@ fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} -fn cond() -> bool { fail!() } -fn for_func(_f: &fn() -> bool) { fail!() } -fn produce() -> T { fail!(); } +fn cond() -> bool { fail2!() } +fn for_func(_f: &fn() -> bool) { fail2!() } +fn produce() -> T { fail2!(); } fn inc(v: &mut ~int) { *v = ~(**v + 1); diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs index 87ab36348c6a..32dfa59927f5 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs @@ -18,14 +18,14 @@ fn box_imm() { let v = ~3; let _w = &v; do task::spawn { - info!("v=%d", *v); + info2!("v={}", *v); //~^ ERROR cannot move `v` into closure } let v = ~3; let _w = &v; task::spawn(|| { - info!("v=%d", *v); + info2!("v={}", *v); //~^ ERROR cannot move }); } diff --git a/src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs b/src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs index 01ca3cd1c282..db9d8d7ceafb 100644 --- a/src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs +++ b/src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs @@ -16,7 +16,7 @@ use std::either::{Either, Left, Right}; *x = Right(1.0); *z } - _ => fail!() + _ => fail2!() } } diff --git a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs index ef37f9b1bb20..145aaa405a6e 100644 --- a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs +++ b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs @@ -23,7 +23,7 @@ pub fn main() { } } let z = tail[0].clone(); - info!(fmt!("%?", z)); + info2!("{:?}", z); } _ => { unreachable!(); diff --git a/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs b/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs index f69036ff9d91..56e047e5bc52 100644 --- a/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs +++ b/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs @@ -12,5 +12,5 @@ fn main() { let x: int = 3; let y: &mut int = &mut x; //~ ERROR cannot borrow *y = 5; - info!(*y); + info2!("{:?}", *y); } diff --git a/src/test/compile-fail/borrowck-ref-into-rvalue.rs b/src/test/compile-fail/borrowck-ref-into-rvalue.rs index cb56e929754d..bd0b4afe730c 100644 --- a/src/test/compile-fail/borrowck-ref-into-rvalue.rs +++ b/src/test/compile-fail/borrowck-ref-into-rvalue.rs @@ -14,7 +14,7 @@ fn main() { Some(ref m) => { //~ ERROR borrowed value does not live long enough msg = m; }, - None => { fail!() } + None => { fail2!() } } println(*msg); } diff --git a/src/test/compile-fail/borrowck-vec-pattern-element-loan.rs b/src/test/compile-fail/borrowck-vec-pattern-element-loan.rs index ca20d68e4cdc..53e69fc1611a 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-element-loan.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-element-loan.rs @@ -2,7 +2,7 @@ fn a() -> &[int] { let vec = ~[1, 2, 3, 4]; let tail = match vec { [_, ..tail] => tail, //~ ERROR does not live long enough - _ => fail!("a") + _ => fail2!("a") }; tail } @@ -11,7 +11,7 @@ fn b() -> &[int] { let vec = ~[1, 2, 3, 4]; let init = match vec { [..init, _] => init, //~ ERROR does not live long enough - _ => fail!("b") + _ => fail2!("b") }; init } @@ -20,7 +20,7 @@ fn c() -> &[int] { let vec = ~[1, 2, 3, 4]; let slice = match vec { [_, ..slice, _] => slice, //~ ERROR does not live long enough - _ => fail!("c") + _ => fail2!("c") }; slice } diff --git a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs index 02ba1b9d2fff..b31e49bceb50 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -4,7 +4,7 @@ fn a() { [~ref _a] => { vec[0] = ~4; //~ ERROR cannot assign to `(*vec)[]` because it is borrowed } - _ => fail!("foo") + _ => fail2!("foo") } } diff --git a/src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs b/src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs index e542238d0356..e0c2d08e4133 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs @@ -2,7 +2,7 @@ fn a() -> &int { let vec = ~[1, 2, 3, 4]; let tail = match vec { [_a, ..tail] => &tail[0], //~ ERROR borrowed value does not live long enough - _ => fail!("foo") + _ => fail2!("foo") }; tail } diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs index 0d1582bf8571..6f483b82d818 100644 --- a/src/test/compile-fail/class-cast-to-trait.rs +++ b/src/test/compile-fail/class-cast-to-trait.rs @@ -22,12 +22,12 @@ struct cat { impl cat { pub fn eat(&self) -> bool { if self.how_hungry > 0 { - error!("OM NOM NOM"); + error2!("OM NOM NOM"); self.how_hungry -= 2; return true; } else { - error!("Not hungry!"); + error2!("Not hungry!"); return false; } } @@ -40,7 +40,7 @@ impl noisy for cat { impl cat { fn meow(&self) { - error!("Meow"); + error2!("Meow"); self.meows += 1; if self.meows % 5 == 0 { self.how_hungry += 1; diff --git a/src/test/compile-fail/class-missing-self.rs b/src/test/compile-fail/class-missing-self.rs index c27c27b5942e..101f96ce0b47 100644 --- a/src/test/compile-fail/class-missing-self.rs +++ b/src/test/compile-fail/class-missing-self.rs @@ -15,7 +15,7 @@ struct cat { impl cat { fn sleep(&self) { loop{} } fn meow(&self) { - error!("Meow"); + error2!("Meow"); meows += 1u; //~ ERROR unresolved name sleep(); //~ ERROR unresolved name } diff --git a/src/test/compile-fail/closure-that-fails.rs b/src/test/compile-fail/closure-that-fails.rs index aad0e8bcbb6d..6663cff9b563 100644 --- a/src/test/compile-fail/closure-that-fails.rs +++ b/src/test/compile-fail/closure-that-fails.rs @@ -2,6 +2,6 @@ fn foo(f: &fn() -> !) {} fn main() { // Type inference didn't use to be able to handle this: - foo(|| fail!()); + foo(|| fail2!()); foo(|| 22); //~ ERROR mismatched types } diff --git a/src/test/compile-fail/copy-a-resource.rs b/src/test/compile-fail/copy-a-resource.rs index c5f5861de825..771f2b2dfb68 100644 --- a/src/test/compile-fail/copy-a-resource.rs +++ b/src/test/compile-fail/copy-a-resource.rs @@ -26,5 +26,5 @@ fn main() { let x = foo(10); let _y = x.clone(); //~^ ERROR does not implement any method in scope - error!(x); + error2!("{:?}", x); } diff --git a/src/test/compile-fail/debug-correct-span.rs b/src/test/compile-fail/debug-correct-span.rs deleted file mode 100644 index f143e6c00a2e..000000000000 --- a/src/test/compile-fail/debug-correct-span.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - debug!("%s %s", 3); //~ ERROR: not enough arguments -} diff --git a/src/test/compile-fail/deref-non-pointer.rs b/src/test/compile-fail/deref-non-pointer.rs index 7b1b0f6243ac..86c56f7ae819 100644 --- a/src/test/compile-fail/deref-non-pointer.rs +++ b/src/test/compile-fail/deref-non-pointer.rs @@ -10,6 +10,6 @@ fn main() { match *1 { //~ ERROR: cannot be dereferenced - _ => { fail!(); } + _ => { fail2!(); } } } diff --git a/src/test/compile-fail/die-not-static.rs b/src/test/compile-fail/die-not-static.rs deleted file mode 100644 index 40a4232717db..000000000000 --- a/src/test/compile-fail/die-not-static.rs +++ /dev/null @@ -1,8 +0,0 @@ -use std::str; - -fn main() { - let v = ~"test"; - let sslice = v.slice(0, v.len()); - //~^ ERROR borrowed value does not live long enough - fail!(sslice); -} diff --git a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs index 2a4d46941b97..aac6cd118b20 100644 --- a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs +++ b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs @@ -14,7 +14,7 @@ struct X { impl Drop for X { fn drop(&mut self) { - error!("value: %s", self.x); + error2!("value: {}", self.x); } } @@ -26,5 +26,5 @@ fn unwrap(x: X) -> ~str { fn main() { let x = X { x: ~"hello" }; let y = unwrap(x); - error!("contents: %s", y); + error2!("contents: {}", y); } diff --git a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs index ecb02c4307d3..e14900c4bb44 100644 --- a/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs +++ b/src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs @@ -14,7 +14,7 @@ struct X { impl Drop for X { fn drop(&mut self) { - error!("value: %s", self.x); + error2!("value: {}", self.x); } } @@ -22,7 +22,7 @@ fn main() { let x = X { x: ~"hello" }; match x { - X { x: y } => error!("contents: %s", y) + X { x: y } => error2!("contents: {}", y) //~^ ERROR cannot move out of type `X`, which defines the `Drop` trait } } diff --git a/src/test/compile-fail/does-nothing.rs b/src/test/compile-fail/does-nothing.rs index 9d2b68ddb81e..dc32e8e10226 100644 --- a/src/test/compile-fail/does-nothing.rs +++ b/src/test/compile-fail/does-nothing.rs @@ -1,2 +1,2 @@ // error-pattern: unresolved name `this_does_nothing_what_the`. -fn main() { info!("doing"); this_does_nothing_what_the; info!("boing"); } +fn main() { info2!("doing"); this_does_nothing_what_the; info2!("boing"); } diff --git a/src/test/compile-fail/export2.rs b/src/test/compile-fail/export2.rs index 22762eb4a7eb..3fdd4000b1b9 100644 --- a/src/test/compile-fail/export2.rs +++ b/src/test/compile-fail/export2.rs @@ -15,7 +15,7 @@ mod foo { } mod bar { - fn x() { info!("x"); } + fn x() { info2!("x"); } pub fn y() { } } diff --git a/src/test/compile-fail/extfmt-missing-type.rs b/src/test/compile-fail/extfmt-missing-type.rs index 012d761c0e6b..7602656eabb0 100644 --- a/src/test/compile-fail/extfmt-missing-type.rs +++ b/src/test/compile-fail/extfmt-missing-type.rs @@ -10,4 +10,4 @@ // error-pattern:missing type -fn main() { fmt!("%+"); } +fn main() { oldfmt!("%+"); } diff --git a/src/test/compile-fail/extfmt-no-args.rs b/src/test/compile-fail/extfmt-no-args.rs index cd9308e7b3f2..2721c780ac6c 100644 --- a/src/test/compile-fail/extfmt-no-args.rs +++ b/src/test/compile-fail/extfmt-no-args.rs @@ -10,4 +10,4 @@ // error-pattern:fmt! takes at least 1 argument -fn main() { fmt!(); } +fn main() { oldfmt!(); } diff --git a/src/test/compile-fail/extfmt-non-literal.rs b/src/test/compile-fail/extfmt-non-literal.rs index 12e9c641d541..7aa744a11caa 100644 --- a/src/test/compile-fail/extfmt-non-literal.rs +++ b/src/test/compile-fail/extfmt-non-literal.rs @@ -14,5 +14,5 @@ fn main() { // fmt!'s first argument must be a literal. Hopefully this // restriction can be eased eventually to just require a // compile-time constant. - let x = fmt!("a" + "b"); + let x = oldfmt!("a" + "b"); } diff --git a/src/test/compile-fail/extfmt-non-literal2.rs b/src/test/compile-fail/extfmt-non-literal2.rs index a38565844d0c..e25eae821275 100644 --- a/src/test/compile-fail/extfmt-non-literal2.rs +++ b/src/test/compile-fail/extfmt-non-literal2.rs @@ -14,5 +14,5 @@ fn main() { // fmt!'s first argument must be a literal. Hopefully this // restriction can be eased eventually to just require a // compile-time constant. - let x = fmt!(20); + let x = oldfmt!(20); } diff --git a/src/test/compile-fail/extfmt-not-enough-args.rs b/src/test/compile-fail/extfmt-not-enough-args.rs index f18ae748ee07..5fd17fe92c14 100644 --- a/src/test/compile-fail/extfmt-not-enough-args.rs +++ b/src/test/compile-fail/extfmt-not-enough-args.rs @@ -12,4 +12,4 @@ extern mod extra; -fn main() { let s = fmt!("%s%s%s", "test", "test"); } +fn main() { let s = oldfmt!("%s%s%s", "test", "test"); } diff --git a/src/test/compile-fail/extfmt-too-many-args.rs b/src/test/compile-fail/extfmt-too-many-args.rs index 2a72dcf89889..5e12543ce8f0 100644 --- a/src/test/compile-fail/extfmt-too-many-args.rs +++ b/src/test/compile-fail/extfmt-too-many-args.rs @@ -12,4 +12,4 @@ extern mod extra; -fn main() { let s = fmt!("%s", "test", "test"); } +fn main() { let s = oldfmt!("%s", "test", "test"); } diff --git a/src/test/compile-fail/extfmt-unknown-type.rs b/src/test/compile-fail/extfmt-unknown-type.rs index 80950232b953..94ded1c528fd 100644 --- a/src/test/compile-fail/extfmt-unknown-type.rs +++ b/src/test/compile-fail/extfmt-unknown-type.rs @@ -10,4 +10,4 @@ // error-pattern:unknown type -fn main() { fmt!("%w"); } +fn main() { oldfmt!("%w"); } diff --git a/src/test/compile-fail/extfmt-unsigned-plus.rs b/src/test/compile-fail/extfmt-unsigned-plus.rs index 652f5b74f809..4e165153c0bd 100644 --- a/src/test/compile-fail/extfmt-unsigned-plus.rs +++ b/src/test/compile-fail/extfmt-unsigned-plus.rs @@ -12,5 +12,5 @@ fn main() { // Can't use a sign on unsigned conversions - fmt!("%+u", 10u); + oldfmt!("%+u", 10u); } diff --git a/src/test/compile-fail/extfmt-unsigned-space.rs b/src/test/compile-fail/extfmt-unsigned-space.rs index afd6cbbe1f1f..8396ecc25c16 100644 --- a/src/test/compile-fail/extfmt-unsigned-space.rs +++ b/src/test/compile-fail/extfmt-unsigned-space.rs @@ -12,5 +12,5 @@ fn main() { // Can't use a space on unsigned conversions - fmt!("% u", 10u); + oldfmt!("% u", 10u); } diff --git a/src/test/compile-fail/extfmt-unterminated-conv.rs b/src/test/compile-fail/extfmt-unterminated-conv.rs index 158a38ed1b55..373a10e99cfd 100644 --- a/src/test/compile-fail/extfmt-unterminated-conv.rs +++ b/src/test/compile-fail/extfmt-unterminated-conv.rs @@ -10,4 +10,4 @@ // error-pattern:unterminated conversion -fn main() { fmt!("%"); } +fn main() { oldfmt!("%"); } diff --git a/src/test/compile-fail/fail-expr.rs b/src/test/compile-fail/fail-expr.rs index 98270bdc5838..4dce462bd416 100644 --- a/src/test/compile-fail/fail-expr.rs +++ b/src/test/compile-fail/fail-expr.rs @@ -10,4 +10,4 @@ // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for int -fn main() { fail!(5); } +fn main() { fail2!(5); } diff --git a/src/test/compile-fail/fail-simple.rs b/src/test/compile-fail/fail-simple.rs index 7def16770a79..bcede4483c74 100644 --- a/src/test/compile-fail/fail-simple.rs +++ b/src/test/compile-fail/fail-simple.rs @@ -12,5 +12,5 @@ // error-pattern:unexpected token fn main() { - fail!(@); + fail2!(@); } diff --git a/src/test/compile-fail/fail-type-err.rs b/src/test/compile-fail/fail-type-err.rs index b6755249bcf9..341f60eeedf8 100644 --- a/src/test/compile-fail/fail-type-err.rs +++ b/src/test/compile-fail/fail-type-err.rs @@ -9,4 +9,4 @@ // except according to those terms. // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for ~[int] -fn main() { fail!(~[0i]); } +fn main() { fail2!(~[0i]); } diff --git a/src/test/compile-fail/functional-struct-update-noncopyable.rs b/src/test/compile-fail/functional-struct-update-noncopyable.rs index 7fccdba17235..284787a81726 100644 --- a/src/test/compile-fail/functional-struct-update-noncopyable.rs +++ b/src/test/compile-fail/functional-struct-update-noncopyable.rs @@ -17,7 +17,7 @@ use extra::arc::*; struct A { y: Arc, x: Arc } impl Drop for A { - fn drop(&mut self) { println(fmt!("x=%?", self.x.get())); } + fn drop(&mut self) { println(format!("x={:?}", self.x.get())); } } fn main() { let a = A { y: Arc::new(1), x: Arc::new(2) }; diff --git a/src/test/compile-fail/if-without-else-result.rs b/src/test/compile-fail/if-without-else-result.rs index 8e3318f6945a..c5fb22c68210 100644 --- a/src/test/compile-fail/if-without-else-result.rs +++ b/src/test/compile-fail/if-without-else-result.rs @@ -12,5 +12,5 @@ fn main() { let a = if true { true }; - info!(a); + info2!("{:?}", a); } diff --git a/src/test/compile-fail/import-glob-0.rs b/src/test/compile-fail/import-glob-0.rs index 805aace081d0..0e920d137a85 100644 --- a/src/test/compile-fail/import-glob-0.rs +++ b/src/test/compile-fail/import-glob-0.rs @@ -13,10 +13,10 @@ use module_of_many_things::*; mod module_of_many_things { - pub fn f1() { info!("f1"); } - pub fn f2() { info!("f2"); } - fn f3() { info!("f3"); } - pub fn f4() { info!("f4"); } + pub fn f1() { info2!("f1"); } + pub fn f2() { info2!("f2"); } + fn f3() { info2!("f3"); } + pub fn f4() { info2!("f4"); } } diff --git a/src/test/compile-fail/import-glob-circular.rs b/src/test/compile-fail/import-glob-circular.rs index 49ee1ad55c0c..334ddbeceee6 100644 --- a/src/test/compile-fail/import-glob-circular.rs +++ b/src/test/compile-fail/import-glob-circular.rs @@ -12,13 +12,13 @@ mod circ1 { pub use circ2::f2; - pub fn f1() { info!("f1"); } + pub fn f1() { info2!("f1"); } pub fn common() -> uint { return 0u; } } mod circ2 { pub use circ1::f1; - pub fn f2() { info!("f2"); } + pub fn f2() { info2!("f2"); } pub fn common() -> uint { return 1u; } } diff --git a/src/test/compile-fail/import.rs b/src/test/compile-fail/import.rs index 5177dc4e4757..129a4aece8f5 100644 --- a/src/test/compile-fail/import.rs +++ b/src/test/compile-fail/import.rs @@ -12,6 +12,6 @@ use zed::bar; use zed::baz; mod zed { - pub fn bar() { info!("bar"); } + pub fn bar() { info2!("bar"); } } fn main(args: ~[str]) { bar(); } diff --git a/src/test/compile-fail/import2.rs b/src/test/compile-fail/import2.rs index e67a79130b1f..8cebbdbc176f 100644 --- a/src/test/compile-fail/import2.rs +++ b/src/test/compile-fail/import2.rs @@ -13,6 +13,6 @@ use baz::zed::bar; //~ ERROR unresolved import mod baz {} mod zed { - pub fn bar() { info!("bar3"); } + pub fn bar() { info2!("bar3"); } } fn main(args: ~[str]) { bar(); } diff --git a/src/test/compile-fail/import3.rs b/src/test/compile-fail/import3.rs index 7a7f4f20aea0..f05a90acc9dd 100644 --- a/src/test/compile-fail/import3.rs +++ b/src/test/compile-fail/import3.rs @@ -11,4 +11,4 @@ // error-pattern: unresolved use main::bar; -fn main(args: ~[str]) { info!("foo"); } +fn main(args: ~[str]) { info2!("foo"); } diff --git a/src/test/compile-fail/import4.rs b/src/test/compile-fail/import4.rs index 087842d78c70..bcc93407ec15 100644 --- a/src/test/compile-fail/import4.rs +++ b/src/test/compile-fail/import4.rs @@ -13,4 +13,4 @@ mod a { pub use b::foo; } mod b { pub use a::foo; } -fn main(args: ~[str]) { info!("loop"); } +fn main(args: ~[str]) { info2!("loop"); } diff --git a/src/test/compile-fail/issue-1448-2.rs b/src/test/compile-fail/issue-1448-2.rs index ba0a2cbab502..bf419db39541 100644 --- a/src/test/compile-fail/issue-1448-2.rs +++ b/src/test/compile-fail/issue-1448-2.rs @@ -10,6 +10,8 @@ // Regression test for issue #1448 and #1386 +fn foo(a: uint) -> uint { a } + fn main() { - info!("%u", 10i); //~ ERROR mismatched types + info2!("{:u}", foo(10i)); //~ ERROR mismatched types } diff --git a/src/test/compile-fail/issue-1476.rs b/src/test/compile-fail/issue-1476.rs index f223cd428ec1..5e1a69227e57 100644 --- a/src/test/compile-fail/issue-1476.rs +++ b/src/test/compile-fail/issue-1476.rs @@ -9,5 +9,5 @@ // except according to those terms. fn main() { - error!(x); //~ ERROR unresolved name `x`. + error2!("{:?}", x); //~ ERROR unresolved name `x`. } diff --git a/src/test/compile-fail/issue-2149.rs b/src/test/compile-fail/issue-2149.rs index dcb85d867063..3f393621fd90 100644 --- a/src/test/compile-fail/issue-2149.rs +++ b/src/test/compile-fail/issue-2149.rs @@ -14,7 +14,7 @@ trait vec_monad { impl vec_monad for ~[A] { fn bind(&self, f: &fn(A) -> ~[B]) { - let mut r = fail!(); + let mut r = fail2!(); for elt in self.iter() { r = r + f(*elt); } //~^ WARNING unreachable expression //~^^ ERROR the type of this value must be known diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs index 64344ab42779..1c4df25f353b 100644 --- a/src/test/compile-fail/issue-2150.rs +++ b/src/test/compile-fail/issue-2150.rs @@ -13,7 +13,7 @@ fn fail_len(v: ~[int]) -> uint { let mut i = 3; - fail!(); + fail2!(); for x in v.iter() { i += 1u; } //~^ ERROR: unreachable statement return i; diff --git a/src/test/compile-fail/issue-2151.rs b/src/test/compile-fail/issue-2151.rs index 5559ba344ed1..db02bb5e55b6 100644 --- a/src/test/compile-fail/issue-2151.rs +++ b/src/test/compile-fail/issue-2151.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - let x = fail!(); + let x = fail2!(); x.clone(); //~ ERROR the type of this value must be known in this context } diff --git a/src/test/compile-fail/issue-2281-part1.rs b/src/test/compile-fail/issue-2281-part1.rs index 0d94e378a4ca..b9b26e12b40f 100644 --- a/src/test/compile-fail/issue-2281-part1.rs +++ b/src/test/compile-fail/issue-2281-part1.rs @@ -10,4 +10,4 @@ // error-pattern: unresolved name `foobar`. -fn main(args: ~[str]) { info!(foobar); } +fn main(args: ~[str]) { info2!("{:?}", foobar); } diff --git a/src/test/compile-fail/issue-2330.rs b/src/test/compile-fail/issue-2330.rs index 6152e82294d1..c8f835ccdc9a 100644 --- a/src/test/compile-fail/issue-2330.rs +++ b/src/test/compile-fail/issue-2330.rs @@ -16,7 +16,7 @@ trait channel { // `chan` is not a trait, it's an enum impl chan for int { //~ ERROR chan is not a trait - fn send(&self, v: int) { fail!() } + fn send(&self, v: int) { fail2!() } } fn main() { diff --git a/src/test/compile-fail/issue-2370-2.rs b/src/test/compile-fail/issue-2370-2.rs index 540089bd59dc..247ef3d751f4 100644 --- a/src/test/compile-fail/issue-2370-2.rs +++ b/src/test/compile-fail/issue-2370-2.rs @@ -15,5 +15,5 @@ struct cat { fn main() { let kitty : cat = cat { x: () }; - error!(*kitty); + error2!("{:?}", *kitty); } diff --git a/src/test/compile-fail/issue-2370.rs b/src/test/compile-fail/issue-2370.rs index cd17cc2afaa0..5754b4bb472e 100644 --- a/src/test/compile-fail/issue-2370.rs +++ b/src/test/compile-fail/issue-2370.rs @@ -15,5 +15,5 @@ struct cat { fn main() { let nyan = cat { foo: () }; - error!(*nyan); + error2!("{:?}", *nyan); } diff --git a/src/test/compile-fail/issue-2611-4.rs b/src/test/compile-fail/issue-2611-4.rs index c62c28745253..77f07a9d793e 100644 --- a/src/test/compile-fail/issue-2611-4.rs +++ b/src/test/compile-fail/issue-2611-4.rs @@ -20,7 +20,7 @@ struct E { } impl A for E { - fn b(_x: F) -> F { fail!() } //~ ERROR type parameter 0 requires `Freeze` + fn b(_x: F) -> F { fail2!() } //~ ERROR type parameter 0 requires `Freeze` } fn main() {} diff --git a/src/test/compile-fail/issue-2611-5.rs b/src/test/compile-fail/issue-2611-5.rs index 9b8346da5c5d..7dc6dd6a8520 100644 --- a/src/test/compile-fail/issue-2611-5.rs +++ b/src/test/compile-fail/issue-2611-5.rs @@ -21,7 +21,7 @@ struct E { impl A for E { // n.b. The error message is awful -- see #3404 - fn b(&self, _x: G) -> G { fail!() } //~ ERROR method `b` has an incompatible type + fn b(&self, _x: G) -> G { fail2!() } //~ ERROR method `b` has an incompatible type } fn main() {} diff --git a/src/test/compile-fail/issue-2823.rs b/src/test/compile-fail/issue-2823.rs index 58b216e8d119..49bc3b9ba6c3 100644 --- a/src/test/compile-fail/issue-2823.rs +++ b/src/test/compile-fail/issue-2823.rs @@ -14,7 +14,7 @@ struct C { impl Drop for C { fn drop(&mut self) { - error!("dropping: %?", self.x); + error2!("dropping: {:?}", self.x); } } diff --git a/src/test/compile-fail/issue-3021.rs b/src/test/compile-fail/issue-3021.rs index 56ade814db02..f8e355360d70 100644 --- a/src/test/compile-fail/issue-3021.rs +++ b/src/test/compile-fail/issue-3021.rs @@ -25,7 +25,7 @@ fn siphash(k0 : u64) -> SipHash { //~^ ERROR unresolved name `k0`. } } - fail!(); + fail2!(); } fn main() {} diff --git a/src/test/compile-fail/issue-3038.rs b/src/test/compile-fail/issue-3038.rs index e16b9f933f79..3ab44b667480 100644 --- a/src/test/compile-fail/issue-3038.rs +++ b/src/test/compile-fail/issue-3038.rs @@ -19,13 +19,13 @@ fn main() { let _z = match g(1, 2) { - g(x, x) => { info!(x + x); } + g(x, x) => { info2!("{:?}", x + x); } //~^ ERROR Identifier `x` is bound more than once in the same pattern }; let _z = match i(l(1, 2), m(3, 4)) { i(l(x, _), m(_, x)) //~ ERROR Identifier `x` is bound more than once in the same pattern - => { error!(x + x); } + => { error2!("{:?}", x + x); } }; let _z = match (1, 2) { diff --git a/src/test/compile-fail/issue-3099.rs b/src/test/compile-fail/issue-3099.rs index abc76b9da0fd..d65001f2b041 100644 --- a/src/test/compile-fail/issue-3099.rs +++ b/src/test/compile-fail/issue-3099.rs @@ -9,13 +9,13 @@ // except according to those terms. fn a(x: ~str) -> ~str { - fmt!("First function with %s", x) + format!("First function with {}", x) } fn a(x: ~str, y: ~str) -> ~str { //~ ERROR duplicate definition of value `a` - fmt!("Second function with %s and %s", x, y) + format!("Second function with {} and {}", x, y) } fn main() { - info!("Result: "); + info2!("Result: "); } diff --git a/src/test/compile-fail/issue-3521-2.rs b/src/test/compile-fail/issue-3521-2.rs index 431f98d8181a..7c56064c2990 100644 --- a/src/test/compile-fail/issue-3521-2.rs +++ b/src/test/compile-fail/issue-3521-2.rs @@ -13,5 +13,5 @@ fn main() { static y: int = foo + 1; //~ ERROR: attempt to use a non-constant value in a constant - error!(y); + error2!("{}", y); } diff --git a/src/test/compile-fail/issue-3521.rs b/src/test/compile-fail/issue-3521.rs index d070a9735e48..aa82ade449d1 100644 --- a/src/test/compile-fail/issue-3521.rs +++ b/src/test/compile-fail/issue-3521.rs @@ -15,5 +15,5 @@ fn main() { Bar = foo //~ ERROR attempt to use a non-constant value in a constant } - error!(Bar); + error2!("{:?}", Bar); } diff --git a/src/test/compile-fail/issue-3601.rs b/src/test/compile-fail/issue-3601.rs index c37c5a3e5afa..4718c5b88a67 100644 --- a/src/test/compile-fail/issue-3601.rs +++ b/src/test/compile-fail/issue-3601.rs @@ -37,6 +37,6 @@ fn main() { ~Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns ~HTMLImageElement(ref d) if d.image.is_some() => { true } }, - _ => fail!("WAT") //~ ERROR unreachable pattern + _ => fail2!("WAT") //~ ERROR unreachable pattern }; } diff --git a/src/test/compile-fail/issue-3668.rs b/src/test/compile-fail/issue-3668.rs index 77e2e4f21e8a..b6bfe79800f6 100644 --- a/src/test/compile-fail/issue-3668.rs +++ b/src/test/compile-fail/issue-3668.rs @@ -16,7 +16,7 @@ trait PTrait { impl PTrait for P { fn getChildOption(&self) -> Option<@P> { static childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant - fail!(); + fail2!(); } } diff --git a/src/test/compile-fail/issue-5062.rs b/src/test/compile-fail/issue-5062.rs index 26fb69f2cd0f..8ff81df938d4 100644 --- a/src/test/compile-fail/issue-5062.rs +++ b/src/test/compile-fail/issue-5062.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn main() { fmt!("%?", None); } //~ ERROR unconstrained type +fn main() { format!("{:?}", None); } //~ ERROR unconstrained type diff --git a/src/test/compile-fail/issue-5439.rs b/src/test/compile-fail/issue-5439.rs index 8bd9bb326316..03fe86cb8797 100644 --- a/src/test/compile-fail/issue-5439.rs +++ b/src/test/compile-fail/issue-5439.rs @@ -25,5 +25,5 @@ impl Bar { fn main () { let bar = Bar { bar: 1 }; let foo = bar.make_foo(2); - println(fmt!("%d", foo.foo)); + println!("{}", foo.foo); } diff --git a/src/test/compile-fail/issue-6458-1.rs b/src/test/compile-fail/issue-6458-1.rs index a54f05ec3480..77ff58e7427b 100644 --- a/src/test/compile-fail/issue-6458-1.rs +++ b/src/test/compile-fail/issue-6458-1.rs @@ -9,4 +9,4 @@ // except according to those terms. fn foo(t: T) {} -fn main() { foo(fail!()) } //~ ERROR cannot determine a type for this expression: unconstrained type +fn main() { foo(fail2!()) } //~ ERROR cannot determine a type for this expression: unconstrained type diff --git a/src/test/compile-fail/issue-6458-2.rs b/src/test/compile-fail/issue-6458-2.rs index 8621b37146ff..f395b7fdd76a 100644 --- a/src/test/compile-fail/issue-6458-2.rs +++ b/src/test/compile-fail/issue-6458-2.rs @@ -9,5 +9,5 @@ // except according to those terms. fn main() { - fmt!("%?", None); //~ ERROR: cannot determine a type for this expression: unconstrained type + format!("{:?}", None); //~ ERROR: cannot determine a type for this bounded } diff --git a/src/test/compile-fail/lint-unused-unsafe.rs b/src/test/compile-fail/lint-unused-unsafe.rs index 6f0c2f1de1ab..9deb7d6fba42 100644 --- a/src/test/compile-fail/lint-unused-unsafe.rs +++ b/src/test/compile-fail/lint-unused-unsafe.rs @@ -19,7 +19,7 @@ mod foo { } } -fn callback(_f: &fn() -> T) -> T { fail!() } +fn callback(_f: &fn() -> T) -> T { fail2!() } unsafe fn unsf() {} fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block @@ -49,7 +49,7 @@ fn good2() { sure that when purity is inherited that the source of the unsafe-ness is tracked correctly */ unsafe { - unsafe fn what() -> ~[~str] { fail!() } + unsafe fn what() -> ~[~str] { fail2!() } do callback { what(); diff --git a/src/test/compile-fail/liveness-and-init.rs b/src/test/compile-fail/liveness-and-init.rs index 64618bb2f7a5..71d063130bf7 100644 --- a/src/test/compile-fail/liveness-and-init.rs +++ b/src/test/compile-fail/liveness-and-init.rs @@ -11,6 +11,6 @@ fn main() { let i: int; - info!(false && { i = 5; true }); - info!(i); //~ ERROR use of possibly uninitialized variable: `i` + info2!("{}", false && { i = 5; true }); + info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` } diff --git a/src/test/compile-fail/liveness-bad-bang-2.rs b/src/test/compile-fail/liveness-bad-bang-2.rs index e9ab87f09e26..87cd83d8aeaf 100644 --- a/src/test/compile-fail/liveness-bad-bang-2.rs +++ b/src/test/compile-fail/liveness-bad-bang-2.rs @@ -12,6 +12,6 @@ // Tests that a function with a ! annotation always actually fails // error-pattern: some control paths may return -fn bad_bang(i: uint) -> ! { info!(3); } +fn bad_bang(i: uint) -> ! { info2!("{}", 3); } fn main() { bad_bang(5u); } diff --git a/src/test/compile-fail/liveness-block-unint.rs b/src/test/compile-fail/liveness-block-unint.rs index 159c945f3c21..9438aa0e52e8 100644 --- a/src/test/compile-fail/liveness-block-unint.rs +++ b/src/test/compile-fail/liveness-block-unint.rs @@ -12,6 +12,6 @@ fn force(f: &fn()) { f(); } fn main() { let x: int; force(|| { - info!(x); //~ ERROR capture of possibly uninitialized variable: `x` + info2!("{}", x); //~ ERROR capture of possibly uninitialized variable: `x` }); } diff --git a/src/test/compile-fail/liveness-break-uninit-2.rs b/src/test/compile-fail/liveness-break-uninit-2.rs index 2c3004056eae..37a91338d8d2 100644 --- a/src/test/compile-fail/liveness-break-uninit-2.rs +++ b/src/test/compile-fail/liveness-break-uninit-2.rs @@ -16,9 +16,9 @@ fn foo() -> int { x = 0; } - info!(x); //~ ERROR use of possibly uninitialized variable: `x` + info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` return 17; } -fn main() { info!(foo()); } +fn main() { info2!("{}", foo()); } diff --git a/src/test/compile-fail/liveness-break-uninit.rs b/src/test/compile-fail/liveness-break-uninit.rs index 9e8a1e8a4d35..5aae93df0dcd 100644 --- a/src/test/compile-fail/liveness-break-uninit.rs +++ b/src/test/compile-fail/liveness-break-uninit.rs @@ -16,9 +16,9 @@ fn foo() -> int { x = 0; } - info!(x); //~ ERROR use of possibly uninitialized variable: `x` + info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` return 17; } -fn main() { info!(foo()); } +fn main() { info2!("{}", foo()); } diff --git a/src/test/compile-fail/liveness-closure-require-ret.rs b/src/test/compile-fail/liveness-closure-require-ret.rs index f624bfe800f5..69aa47bd567a 100644 --- a/src/test/compile-fail/liveness-closure-require-ret.rs +++ b/src/test/compile-fail/liveness-closure-require-ret.rs @@ -9,4 +9,4 @@ // except according to those terms. fn force(f: &fn() -> int) -> int { f() } -fn main() { info!(force(|| {})); } //~ ERROR mismatched types +fn main() { info2!("{:?}", force(|| {})); } //~ ERROR mismatched types diff --git a/src/test/compile-fail/liveness-if-no-else.rs b/src/test/compile-fail/liveness-if-no-else.rs index e9f831219e0c..a0436d984167 100644 --- a/src/test/compile-fail/liveness-if-no-else.rs +++ b/src/test/compile-fail/liveness-if-no-else.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn foo(x: int) { info!(x); } +fn foo(x: int) { info2!("{}", x); } fn main() { let x: int; if 1 > 2 { x = 10; } diff --git a/src/test/compile-fail/liveness-if-with-else.rs b/src/test/compile-fail/liveness-if-with-else.rs index e2cf820f1911..cf13f7117eea 100644 --- a/src/test/compile-fail/liveness-if-with-else.rs +++ b/src/test/compile-fail/liveness-if-with-else.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn foo(x: int) { info!(x); } +fn foo(x: int) { info2!("{:?}", x); } fn main() { let x: int; if 1 > 2 { - info!("whoops"); + info2!("whoops"); } else { x = 10; } diff --git a/src/test/compile-fail/liveness-init-in-fn-expr.rs b/src/test/compile-fail/liveness-init-in-fn-expr.rs index b6c7895235b1..db8afdf45ae2 100644 --- a/src/test/compile-fail/liveness-init-in-fn-expr.rs +++ b/src/test/compile-fail/liveness-init-in-fn-expr.rs @@ -13,5 +13,5 @@ fn main() { let i: int; i //~ ERROR use of possibly uninitialized variable: `i` }; - error!(f()); + error2!("{:?}", f()); } diff --git a/src/test/compile-fail/liveness-move-in-loop.rs b/src/test/compile-fail/liveness-move-in-loop.rs index b6cecf0145ce..769de1e7ef3d 100644 --- a/src/test/compile-fail/liveness-move-in-loop.rs +++ b/src/test/compile-fail/liveness-move-in-loop.rs @@ -12,7 +12,7 @@ fn main() { let y: ~int = ~42; let mut x: ~int; loop { - info!(y); + info2!("{:?}", y); loop { loop { loop { diff --git a/src/test/compile-fail/liveness-move-in-while.rs b/src/test/compile-fail/liveness-move-in-while.rs index eed7ba16da41..752c6c9f1b71 100644 --- a/src/test/compile-fail/liveness-move-in-while.rs +++ b/src/test/compile-fail/liveness-move-in-while.rs @@ -13,7 +13,7 @@ fn main() { let y: ~int = ~42; let mut x: ~int; loop { - info!(y); //~ ERROR use of moved value: `y` + info2!("{:?}", y); //~ ERROR use of moved value: `y` while true { while true { while true { x = y; x.clone(); } } } //~^ ERROR use of moved value: `y` } diff --git a/src/test/compile-fail/liveness-or-init.rs b/src/test/compile-fail/liveness-or-init.rs index ee2a550d9837..9ab7a64e8bdf 100644 --- a/src/test/compile-fail/liveness-or-init.rs +++ b/src/test/compile-fail/liveness-or-init.rs @@ -11,6 +11,6 @@ fn main() { let i: int; - info!(false || { i = 5; true }); - info!(i); //~ ERROR use of possibly uninitialized variable: `i` + info2!("{}", false || { i = 5; true }); + info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` } diff --git a/src/test/compile-fail/liveness-uninit.rs b/src/test/compile-fail/liveness-uninit.rs index 015f824f6891..439aff342bc6 100644 --- a/src/test/compile-fail/liveness-uninit.rs +++ b/src/test/compile-fail/liveness-uninit.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn foo(x: int) { info!(x); } +fn foo(x: int) { info2!("{}", x); } fn main() { let x: int; diff --git a/src/test/compile-fail/liveness-use-after-move.rs b/src/test/compile-fail/liveness-use-after-move.rs index 3423c780c4ae..8ef3c5494aec 100644 --- a/src/test/compile-fail/liveness-use-after-move.rs +++ b/src/test/compile-fail/liveness-use-after-move.rs @@ -11,6 +11,6 @@ fn main() { let x = ~5; let y = x; - info!(*x); //~ ERROR use of moved value: `x` + info2!("{:?}", *x); //~ ERROR use of moved value: `x` y.clone(); } diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs index 5a748fbc81c9..4f2d84ad13b0 100644 --- a/src/test/compile-fail/liveness-use-after-send.rs +++ b/src/test/compile-fail/liveness-use-after-send.rs @@ -9,9 +9,9 @@ // except according to those terms. fn send(ch: _chan, data: T) { - info!(ch); - info!(data); - fail!(); + info2!("{:?}", ch); + info2!("{:?}", data); + fail2!(); } struct _chan(int); @@ -20,7 +20,7 @@ struct _chan(int); // message after the send deinitializes it fn test00_start(ch: _chan<~int>, message: ~int, _count: ~int) { send(ch, message); - info!(message); //~ ERROR use of moved value: `message` + info2!("{:?}", message); //~ ERROR use of moved value: `message` } -fn main() { fail!(); } +fn main() { fail2!(); } diff --git a/src/test/compile-fail/liveness-while-break.rs b/src/test/compile-fail/liveness-while-break.rs index 712d586852af..02d8656baff1 100644 --- a/src/test/compile-fail/liveness-while-break.rs +++ b/src/test/compile-fail/liveness-while-break.rs @@ -14,7 +14,7 @@ fn test(cond: bool) { v = 3; break; } - info!("%d", v); //~ ERROR use of possibly uninitialized variable: `v` + info2!("{}", v); //~ ERROR use of possibly uninitialized variable: `v` } fn main() { diff --git a/src/test/compile-fail/match-join.rs b/src/test/compile-fail/match-join.rs index 818671e11332..5d9ae958ce0c 100644 --- a/src/test/compile-fail/match-join.rs +++ b/src/test/compile-fail/match-join.rs @@ -11,11 +11,11 @@ // a good test that we merge paths correctly in the presence of a // variable that's used before it's declared -fn my_fail() -> ! { fail!(); } +fn my_fail() -> ! { fail2!(); } fn main() { match true { false => { my_fail(); } true => { } } - info!(x); //~ ERROR unresolved name `x`. + info2!("{:?}", x); //~ ERROR unresolved name `x`. let x: int; } diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs index fec0f89adbaf..6531ae035843 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -2,7 +2,7 @@ // they occur as part of various kinds of expressions. struct Foo { f: A } -fn guard(_s: ~str) -> bool {fail!()} +fn guard(_s: ~str) -> bool {fail2!()} fn touch(_a: &A) {} fn f10() { diff --git a/src/test/compile-fail/moves-based-on-type-match-bindings.rs b/src/test/compile-fail/moves-based-on-type-match-bindings.rs index 42944a206b36..4893c8b71979 100644 --- a/src/test/compile-fail/moves-based-on-type-match-bindings.rs +++ b/src/test/compile-fail/moves-based-on-type-match-bindings.rs @@ -3,7 +3,7 @@ // terms of the binding, not the discriminant. struct Foo { f: A } -fn guard(_s: ~str) -> bool {fail!()} +fn guard(_s: ~str) -> bool {fail2!()} fn touch(_a: &A) {} fn f10() { diff --git a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs index 2762140be379..d1eae1ae6134 100644 --- a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs @@ -30,7 +30,7 @@ fn innocent_looking_victim() { (f.c)(f, true); println!("{:?}", msg); }, - None => fail!("oops"), + None => fail2!("oops"), } } } diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs index fd54b6638c65..90a68d796f30 100644 --- a/src/test/compile-fail/no-capture-arc.rs +++ b/src/test/compile-fail/no-capture-arc.rs @@ -26,5 +26,5 @@ fn main() { assert_eq!((arc_v.get())[2], 3); - info!(arc_v); + info2!("{:?}", arc_v); } diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index a17196ae298e..9eca13298245 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -24,5 +24,5 @@ fn main() { assert_eq!((arc_v.get())[2], 3); //~ ERROR use of moved value: `arc_v` - info!(arc_v); //~ ERROR use of moved value: `arc_v` + info2!("{:?}", arc_v); //~ ERROR use of moved value: `arc_v` } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index e7b897ad9068..f6d1aceab646 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -33,6 +33,6 @@ fn main() { do task::spawn { let y = x.take(); //~ ERROR does not fulfill `Send` - error!(y); + error2!("{:?}", y); } } diff --git a/src/test/compile-fail/non-exhaustive-match-nested.rs b/src/test/compile-fail/non-exhaustive-match-nested.rs index b87b3c5245a8..f5660fd35106 100644 --- a/src/test/compile-fail/non-exhaustive-match-nested.rs +++ b/src/test/compile-fail/non-exhaustive-match-nested.rs @@ -16,7 +16,7 @@ enum u { c, d } fn main() { let x = a(c); match x { - a(d) => { fail!("hello"); } - b => { fail!("goodbye"); } + a(d) => { fail2!("hello"); } + b => { fail2!("goodbye"); } } } diff --git a/src/test/compile-fail/noncopyable-class.rs b/src/test/compile-fail/noncopyable-class.rs index 9d057998c790..199bdaa397ad 100644 --- a/src/test/compile-fail/noncopyable-class.rs +++ b/src/test/compile-fail/noncopyable-class.rs @@ -39,5 +39,5 @@ fn foo(i:int) -> foo { fn main() { let x = foo(10); let _y = x.clone(); //~ ERROR does not implement any method in scope - error!(x); + error2!("{:?}", x); } diff --git a/src/test/compile-fail/nonscalar-cast.rs b/src/test/compile-fail/nonscalar-cast.rs index 9cfd63dd51fd..45efa8929890 100644 --- a/src/test/compile-fail/nonscalar-cast.rs +++ b/src/test/compile-fail/nonscalar-cast.rs @@ -15,5 +15,5 @@ struct foo { } fn main() { - info!(foo{ x: 1 } as int); + info2!("{:?}", foo{ x: 1 } as int); } diff --git a/src/test/compile-fail/not-enough-arguments.rs b/src/test/compile-fail/not-enough-arguments.rs index 57eca3666ef1..a53736580d9b 100644 --- a/src/test/compile-fail/not-enough-arguments.rs +++ b/src/test/compile-fail/not-enough-arguments.rs @@ -13,7 +13,7 @@ // unrelated errors. fn foo(a: int, b: int, c: int, d:int) { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/compile-fail/oversized-literal.rs b/src/test/compile-fail/oversized-literal.rs index f46ef0563164..5b5cab25e046 100644 --- a/src/test/compile-fail/oversized-literal.rs +++ b/src/test/compile-fail/oversized-literal.rs @@ -10,4 +10,4 @@ // error-pattern:literal out of range -fn main() { info!(300u8); } +fn main() { info2!("{}", 300u8); } diff --git a/src/test/compile-fail/packed-struct-generic-transmute.rs b/src/test/compile-fail/packed-struct-generic-transmute.rs index 8e15f11231e9..0a5bc4ad8bb8 100644 --- a/src/test/compile-fail/packed-struct-generic-transmute.rs +++ b/src/test/compile-fail/packed-struct-generic-transmute.rs @@ -32,6 +32,6 @@ fn main() { let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 }; unsafe { let oof: Oof<[u8, .. 5], i32> = cast::transmute(foo); - info!(oof); + info2!("{:?}", oof); } } diff --git a/src/test/compile-fail/packed-struct-transmute.rs b/src/test/compile-fail/packed-struct-transmute.rs index 38419b8df88a..79978dedb567 100644 --- a/src/test/compile-fail/packed-struct-transmute.rs +++ b/src/test/compile-fail/packed-struct-transmute.rs @@ -32,6 +32,6 @@ fn main() { let foo = Foo { bar: 1, baz: 10 }; unsafe { let oof: Oof = cast::transmute(foo); - info!(oof); + info2!("{:?}", oof); } } diff --git a/src/test/compile-fail/pattern-tyvar-2.rs b/src/test/compile-fail/pattern-tyvar-2.rs index 537d095d2d7a..216280b34e92 100644 --- a/src/test/compile-fail/pattern-tyvar-2.rs +++ b/src/test/compile-fail/pattern-tyvar-2.rs @@ -15,6 +15,6 @@ extern mod extra; enum bar { t1((), Option<~[int]>), t2, } // n.b. my change changes this error message, but I think it's right -- tjc -fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail!(); } } } //~ ERROR binary operation * cannot be applied to +fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail2!(); } } } //~ ERROR binary operation * cannot be applied to fn main() { } diff --git a/src/test/compile-fail/pattern-tyvar.rs b/src/test/compile-fail/pattern-tyvar.rs index 49ad8f87de33..67a4bacbe9a9 100644 --- a/src/test/compile-fail/pattern-tyvar.rs +++ b/src/test/compile-fail/pattern-tyvar.rs @@ -18,9 +18,9 @@ enum bar { t1((), Option<~[int]>), t2, } fn foo(t: bar) { match t { t1(_, Some::(x)) => { - info!(x); + info2!("{:?}", x); } - _ => { fail!(); } + _ => { fail2!(); } } } diff --git a/src/test/compile-fail/pinned-deep-copy.rs b/src/test/compile-fail/pinned-deep-copy.rs index 822c68121163..8baba6cccc11 100644 --- a/src/test/compile-fail/pinned-deep-copy.rs +++ b/src/test/compile-fail/pinned-deep-copy.rs @@ -37,7 +37,7 @@ fn main() { // Can't do this copy let x = ~~~A {y: r(i)}; let _z = x.clone(); //~ ERROR failed to find an implementation - info!(x); + info2!("{:?}", x); } - error!(*i); + error2!("{:?}", *i); } diff --git a/src/test/compile-fail/regions-addr-of-self.rs b/src/test/compile-fail/regions-addr-of-self.rs index 4565d897c72b..1904f0826176 100644 --- a/src/test/compile-fail/regions-addr-of-self.rs +++ b/src/test/compile-fail/regions-addr-of-self.rs @@ -33,5 +33,5 @@ fn dog() -> dog { fn main() { let mut d = dog(); d.chase_cat(); - info!("cats_chased: %u", d.cats_chased); + info2!("cats_chased: {}", d.cats_chased); } diff --git a/src/test/compile-fail/regions-fn-subtyping.rs b/src/test/compile-fail/regions-fn-subtyping.rs index 5928d31a6686..10107f64158d 100644 --- a/src/test/compile-fail/regions-fn-subtyping.rs +++ b/src/test/compile-fail/regions-fn-subtyping.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn of() -> &fn(T) { fail!(); } -fn subtype(x: &fn(T)) { fail!(); } +fn of() -> &fn(T) { fail2!(); } +fn subtype(x: &fn(T)) { fail2!(); } fn test_fn<'x,'y,'z,T>(_x: &'x T, _y: &'y T, _z: &'z T) { // Here, x, y, and z are free. Other letters diff --git a/src/test/compile-fail/regions-free-region-ordering-callee.rs b/src/test/compile-fail/regions-free-region-ordering-callee.rs index 66ab4b770543..872491adaacc 100644 --- a/src/test/compile-fail/regions-free-region-ordering-callee.rs +++ b/src/test/compile-fail/regions-free-region-ordering-callee.rs @@ -27,7 +27,7 @@ fn ordering3<'a, 'b>(x: &'a uint, y: &'b uint) -> &'a &'b uint { // Do not infer an ordering from the return value. let z: &'b uint = &*x; //~^ ERROR cannot infer an appropriate lifetime due to conflicting requirements - fail!(); + fail2!(); } fn ordering4<'a, 'b>(a: &'a uint, b: &'b uint, x: &fn(&'a &'b uint)) { diff --git a/src/test/compile-fail/regions-freevar.rs b/src/test/compile-fail/regions-freevar.rs index 6bc93e3af7c7..06e91ddcf56d 100644 --- a/src/test/compile-fail/regions-freevar.rs +++ b/src/test/compile-fail/regions-freevar.rs @@ -13,6 +13,6 @@ fn wants_static_fn(_x: &'static fn()) {} fn main() { let i = 3; do wants_static_fn { //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements - info!("i=%d", i); + info2!("i={}", i); } } diff --git a/src/test/compile-fail/regions-ret-borrowed-1.rs b/src/test/compile-fail/regions-ret-borrowed-1.rs index de4a05c9895c..885d50b7efc4 100644 --- a/src/test/compile-fail/regions-ret-borrowed-1.rs +++ b/src/test/compile-fail/regions-ret-borrowed-1.rs @@ -24,5 +24,5 @@ fn return_it<'a>() -> &'a int { fn main() { let x = return_it(); - info!("foo=%d", *x); + info2!("foo={}", *x); } diff --git a/src/test/compile-fail/regions-ret-borrowed.rs b/src/test/compile-fail/regions-ret-borrowed.rs index 1aa2329aaec6..5dea40f4ac7c 100644 --- a/src/test/compile-fail/regions-ret-borrowed.rs +++ b/src/test/compile-fail/regions-ret-borrowed.rs @@ -27,5 +27,5 @@ fn return_it() -> &int { fn main() { let x = return_it(); - info!("foo=%d", *x); + info2!("foo={}", *x); } diff --git a/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs b/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs index ebd3320d9012..ce6d12a22655 100644 --- a/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs +++ b/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs @@ -16,7 +16,7 @@ extern mod std; fn last(v: ~[&T]) -> std::option::Option { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/compile-fail/tag-type-args.rs b/src/test/compile-fail/tag-type-args.rs index f2ef1d195250..a88435bff6eb 100644 --- a/src/test/compile-fail/tag-type-args.rs +++ b/src/test/compile-fail/tag-type-args.rs @@ -14,4 +14,4 @@ enum quux { bar } fn foo(c: quux) { assert!((false)); } -fn main() { fail!(); } +fn main() { fail2!(); } diff --git a/src/test/compile-fail/unconstrained-none.rs b/src/test/compile-fail/unconstrained-none.rs index 7993df80b8d1..798b92fd57b8 100644 --- a/src/test/compile-fail/unconstrained-none.rs +++ b/src/test/compile-fail/unconstrained-none.rs @@ -11,5 +11,5 @@ // Issue #5062 fn main() { - fmt!("%?", None); //~ ERROR cannot determine a type for this expression: unconstrained type + None; //~ ERROR cannot determine a type for this expression: unconstrained type } diff --git a/src/test/compile-fail/unique-pinned-nocopy.rs b/src/test/compile-fail/unique-pinned-nocopy.rs index 50bb074fc7ac..8882bd1e2681 100644 --- a/src/test/compile-fail/unique-pinned-nocopy.rs +++ b/src/test/compile-fail/unique-pinned-nocopy.rs @@ -19,5 +19,5 @@ impl Drop for r { fn main() { let i = ~r { b: true }; let _j = i.clone(); //~ ERROR failed to find an implementation - info!(i); + info2!("{:?}", i); } diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index 0fcbc847850b..4bc181cbdfa9 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -31,6 +31,6 @@ fn main() { let r2 = ~[~r { i: i2 }]; f(r1.clone(), r2.clone()); //~^ ERROR failed to find an implementation of - info!((r2, *i1)); - info!((r1, *i2)); + info2!("{:?}", (r2, *i1)); + info2!("{:?}", (r1, *i2)); } diff --git a/src/test/compile-fail/unsupported-cast.rs b/src/test/compile-fail/unsupported-cast.rs index faa0069a1136..d9a5302aedcb 100644 --- a/src/test/compile-fail/unsupported-cast.rs +++ b/src/test/compile-fail/unsupported-cast.rs @@ -13,5 +13,5 @@ use std::libc; fn main() { - info!(1.0 as *libc::FILE); // Can't cast float to foreign. + info2!("{:?}", 1.0 as *libc::FILE); // Can't cast float to foreign. } diff --git a/src/test/compile-fail/vec-field.rs b/src/test/compile-fail/vec-field.rs index bc2786b2c19a..38bba1efea57 100644 --- a/src/test/compile-fail/vec-field.rs +++ b/src/test/compile-fail/vec-field.rs @@ -13,7 +13,7 @@ fn f() { let v = ~[1i]; - info!(v.some_field_name); //type error + info2!("{}", v.some_field_name); //type error } fn main() { } diff --git a/src/test/compile-fail/vec-res-add.rs b/src/test/compile-fail/vec-res-add.rs index e7441a2c9681..48db83bd92f3 100644 --- a/src/test/compile-fail/vec-res-add.rs +++ b/src/test/compile-fail/vec-res-add.rs @@ -25,5 +25,5 @@ fn main() { let i = ~[r(0)]; let j = ~[r(1)]; let k = i + j; - info!(j); + info2!("{}", j); }