diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index bf920bcaf75..e253c9bd059 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -91,7 +91,7 @@ pub fn parse_config(args: ~[~str]) -> config { let matches = &match getopts::groups::getopts(args_, groups) { Ok(m) => m, - Err(f) => fail2!(f.to_err_msg()) + Err(f) => fail2!("{}", f.to_err_msg()) }; if matches.opt_present("h") || matches.opt_present("help") { diff --git a/src/test/auxiliary/cci_class_4.rs b/src/test/auxiliary/cci_class_4.rs index 98e5c8c2b5b..78f9d62087b 100644 --- a/src/test/auxiliary/cci_class_4.rs +++ b/src/test/auxiliary/cci_class_4.rs @@ -21,11 +21,11 @@ pub mod kitties { pub fn eat(&mut 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; } } @@ -33,7 +33,7 @@ pub mod kitties { impl cat { pub fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; diff --git a/src/test/auxiliary/cci_class_cast.rs b/src/test/auxiliary/cci_class_cast.rs index 8fac4a3f322..906928d1b79 100644 --- a/src/test/auxiliary/cci_class_cast.rs +++ b/src/test/auxiliary/cci_class_cast.rs @@ -21,7 +21,7 @@ pub mod kitty { impl cat { fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; @@ -35,12 +35,12 @@ pub mod kitty { pub fn eat(&mut 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; } } diff --git a/src/test/auxiliary/cci_nested_lib.rs b/src/test/auxiliary/cci_nested_lib.rs index 350bd09826f..626947306c7 100644 --- a/src/test/auxiliary/cci_nested_lib.rs +++ b/src/test/auxiliary/cci_nested_lib.rs @@ -33,7 +33,7 @@ pub fn alist_get uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); rustrt::rust_dbg_call(cb, n) } } diff --git a/src/test/auxiliary/issue2378a.rs b/src/test/auxiliary/issue2378a.rs index ea14229cc48..20b3a3280ec 100644 --- a/src/test/auxiliary/issue2378a.rs +++ b/src/test/auxiliary/issue2378a.rs @@ -17,7 +17,7 @@ impl Index for maybe { fn index(&self, _idx: &uint) -> T { match self { &just(ref t) => (*t).clone(), - ¬hing => { fail!(); } + ¬hing => { fail2!(); } } } } diff --git a/src/test/auxiliary/issue_2723_a.rs b/src/test/auxiliary/issue_2723_a.rs index b3fa8e73cc2..384f69c736c 100644 --- a/src/test/auxiliary/issue_2723_a.rs +++ b/src/test/auxiliary/issue_2723_a.rs @@ -9,5 +9,5 @@ // except according to those terms. pub unsafe fn f(xs: ~[int]) { - xs.map(|_x| { unsafe fn q() { fail!(); } }); + xs.map(|_x| { unsafe fn q() { fail2!(); } }); } diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs index 6978b9209d8..ef173d52bc4 100644 --- a/src/test/auxiliary/static-methods-crate.rs +++ b/src/test/auxiliary/static-methods-crate.rs @@ -38,6 +38,6 @@ impl read for bool { pub fn read(s: ~str) -> T { match read::readMaybe(s) { Some(x) => x, - _ => fail!("read failed!") + _ => fail2!("read failed!") } } diff --git a/src/test/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs index 4352c139b62..873eb66e52e 100644 --- a/src/test/run-pass/alignment-gep-tup-like-1.rs +++ b/src/test/run-pass/alignment-gep-tup-like-1.rs @@ -36,7 +36,7 @@ fn f(a: A, b: u16) -> @Invokable { pub fn main() { let (a, b) = f(22_u64, 44u16).f(); - info!("a=%? b=%?", a, b); + info2!("a={:?} b={:?}", a, b); assert_eq!(a, 22u64); assert_eq!(b, 44u16); } diff --git a/src/test/run-pass/alignment-gep-tup-like-2.rs b/src/test/run-pass/alignment-gep-tup-like-2.rs index 9bf95968a9a..7c43385ed61 100644 --- a/src/test/run-pass/alignment-gep-tup-like-2.rs +++ b/src/test/run-pass/alignment-gep-tup-like-2.rs @@ -55,7 +55,7 @@ pub fn main() { let z = f(~x, y); make_cycle(z); let (a, b) = z.f(); - info!("a=%u b=%u", *a as uint, b as uint); + info2!("a={} b={}", *a as uint, b as uint); assert_eq!(*a, x); assert_eq!(b, y); } diff --git a/src/test/run-pass/arith-0.rs b/src/test/run-pass/arith-0.rs index ca01e1e10c3..9944241836b 100644 --- a/src/test/run-pass/arith-0.rs +++ b/src/test/run-pass/arith-0.rs @@ -12,6 +12,6 @@ pub fn main() { let a: int = 10; - info!(a); + info2!("{}", a); assert_eq!(a * (a - 1), 90); } diff --git a/src/test/run-pass/arith-1.rs b/src/test/run-pass/arith-1.rs index 8cde06ab428..db8f0eac4f6 100644 --- a/src/test/run-pass/arith-1.rs +++ b/src/test/run-pass/arith-1.rs @@ -28,6 +28,6 @@ pub fn main() { assert_eq!(i32_b << 1, i32_b << 1); assert_eq!(i32_b >> 1, i32_b >> 1); assert_eq!(i32_b & i32_b << 1, 0); - info!(i32_b | i32_b << 1); + info2!("{}", i32_b | i32_b << 1); assert_eq!(i32_b | i32_b << 1, 0x30303030); } diff --git a/src/test/run-pass/attr-main-2.rs b/src/test/run-pass/attr-main-2.rs index 741f7006633..6078698ebd6 100644 --- a/src/test/run-pass/attr-main-2.rs +++ b/src/test/run-pass/attr-main-2.rs @@ -11,7 +11,7 @@ // xfail-fast pub fn main() { - fail!() + fail2!() } #[main] diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs index 47cf1262901..d8399848e09 100644 --- a/src/test/run-pass/auto-instantiate.rs +++ b/src/test/run-pass/auto-instantiate.rs @@ -19,6 +19,6 @@ struct Triple { x: int, y: int, z: int } fn f(x: T, y: U) -> Pair { return Pair {a: x, b: y}; } pub fn main() { - info!("%?", f(Triple {x: 3, y: 4, z: 5}, 4).a.x); - info!("%?", f(5, 6).a); + info2!("{:?}", f(Triple {x: 3, y: 4, z: 5}, 4).a.x); + info2!("{:?}", f(5, 6).a); } diff --git a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs index cae3bff8043..096e4378b3d 100644 --- a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs +++ b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs @@ -14,13 +14,13 @@ trait Foo { impl Foo for @T { fn foo(&self) -> ~str { - fmt!("@%s", (**self).foo()) + format!("@{}", (**self).foo()) } } impl Foo for uint { fn foo(&self) -> ~str { - fmt!("%u", *self) + format!("{}", *self) } } diff --git a/src/test/run-pass/binary-minus-without-space.rs b/src/test/run-pass/binary-minus-without-space.rs index 78edf3e112e..f312cdae8bd 100644 --- a/src/test/run-pass/binary-minus-without-space.rs +++ b/src/test/run-pass/binary-minus-without-space.rs @@ -11,6 +11,6 @@ // Check that issue #954 stays fixed pub fn main() { - match -1 { -1 => {}, _ => fail!("wat") } + match -1 { -1 => {}, _ => fail2!("wat") } assert_eq!(1-1, 0); } diff --git a/src/test/run-pass/bind-by-move.rs b/src/test/run-pass/bind-by-move.rs index a7a4aa9885e..ad5573889dd 100644 --- a/src/test/run-pass/bind-by-move.rs +++ b/src/test/run-pass/bind-by-move.rs @@ -18,6 +18,6 @@ pub fn main() { let x = Some(p); match x { Some(z) => { dispose(z); }, - None => fail!() + None => fail2!() } } diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index 333794e98bf..10a7355c91d 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -81,7 +81,7 @@ fn test_class() { let mut r = p(1, 2); unsafe { - error!("q = %x, r = %x", + error2!("q = {:x}, r = {:x}", (::std::cast::transmute::<*p, uint>(&q)), (::std::cast::transmute::<*p, uint>(&r))); } diff --git a/src/test/run-pass/bitwise.rs b/src/test/run-pass/bitwise.rs index 49ff17317c8..b99067419b0 100644 --- a/src/test/run-pass/bitwise.rs +++ b/src/test/run-pass/bitwise.rs @@ -27,8 +27,8 @@ fn general() { a ^= b; b ^= a; a = a ^ b; - info!(a); - info!(b); + info2!("{}", a); + info2!("{}", b); assert_eq!(b, 1); assert_eq!(a, 2); assert_eq!(!0xf0 & 0xff, 0xf); diff --git a/src/test/run-pass/block-arg.rs b/src/test/run-pass/block-arg.rs index 717093e9de7..18da52ca88f 100644 --- a/src/test/run-pass/block-arg.rs +++ b/src/test/run-pass/block-arg.rs @@ -14,7 +14,7 @@ pub fn main() { // Statement form does not require parentheses: for i in v.iter() { - info!("%?", *i); + info2!("{:?}", *i); } // Usable at all: @@ -35,14 +35,14 @@ pub fn main() { assert!(false); } match do v.iter().all |e| { e.is_negative() } { - true => { fail!("incorrect answer."); } + true => { fail2!("incorrect answer."); } false => { } } match 3 { _ if do v.iter().any |e| { e.is_negative() } => { } _ => { - fail!("wrong answer."); + fail2!("wrong answer."); } } diff --git a/src/test/run-pass/block-explicit-types.rs b/src/test/run-pass/block-explicit-types.rs index ff65d963000..1931ec589ac 100644 --- a/src/test/run-pass/block-explicit-types.rs +++ b/src/test/run-pass/block-explicit-types.rs @@ -10,5 +10,5 @@ pub fn main() { fn as_buf(s: ~str, f: &fn(~str) -> T) -> T { f(s) } - as_buf(~"foo", |foo: ~str| -> () error!(foo) ); + as_buf(~"foo", |foo: ~str| -> () error2!("{}", foo) ); } diff --git a/src/test/run-pass/block-iter-1.rs b/src/test/run-pass/block-iter-1.rs index 790757463c6..806ed035d5a 100644 --- a/src/test/run-pass/block-iter-1.rs +++ b/src/test/run-pass/block-iter-1.rs @@ -20,6 +20,6 @@ pub fn main() { odds += 1; } }); - error!(odds); + error2!("{:?}", odds); assert_eq!(odds, 4); } diff --git a/src/test/run-pass/block-iter-2.rs b/src/test/run-pass/block-iter-2.rs index 29b693ec376..c84033e5bde 100644 --- a/src/test/run-pass/block-iter-2.rs +++ b/src/test/run-pass/block-iter-2.rs @@ -20,6 +20,6 @@ pub fn main() { sum += *i * *j; }); }); - error!(sum); + error2!("{:?}", sum); assert_eq!(sum, 225); } diff --git a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs index 4e79013de83..09c3dd2d54b 100644 --- a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs +++ b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs @@ -19,11 +19,11 @@ impl Foo { ); match s { ~Bar2(id, rest) => declare!(id, self.elaborate_stm(rest)), - _ => fail!() + _ => fail2!() } } - fn check_id(&mut self, s: int) { fail!() } + fn check_id(&mut self, s: int) { fail2!() } } - + pub fn main() { } diff --git a/src/test/run-pass/borrowck-mut-uniq.rs b/src/test/run-pass/borrowck-mut-uniq.rs index 633e0f71b9e..8ff326ed870 100644 --- a/src/test/run-pass/borrowck-mut-uniq.rs +++ b/src/test/run-pass/borrowck-mut-uniq.rs @@ -31,9 +31,9 @@ pub fn main() { add_int(ints, 44); do iter_ints(ints) |i| { - error!("int = %d", *i); + error2!("int = {}", *i); true }; - error!("ints=%?", ints); + error2!("ints={:?}", ints); } diff --git a/src/test/run-pass/borrowck-preserve-box-in-discr.rs b/src/test/run-pass/borrowck-preserve-box-in-discr.rs index 219e57a3e8c..4be38df939b 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-discr.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-discr.rs @@ -23,7 +23,7 @@ pub fn main() { x = @F {f: ~4}; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(**b_x)) as uint); assert_eq!(**b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(**b_x))); diff --git a/src/test/run-pass/borrowck-preserve-box-in-field.rs b/src/test/run-pass/borrowck-preserve-box-in-field.rs index a85ab027f2c..ddc1d618697 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-field.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-field.rs @@ -28,7 +28,7 @@ pub fn main() { assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x))); x = @F {f: ~4}; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(*b_x)) as uint); assert_eq!(*b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x))); diff --git a/src/test/run-pass/borrowck-preserve-box-in-pat.rs b/src/test/run-pass/borrowck-preserve-box-in-pat.rs index c53b4b4e747..dc389ed1bc8 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-pat.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-pat.rs @@ -23,7 +23,7 @@ pub fn main() { *x = @F {f: ~4}; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(**b_x)) as uint); assert_eq!(**b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(**b_x))); diff --git a/src/test/run-pass/borrowck-preserve-box-in-uniq.rs b/src/test/run-pass/borrowck-preserve-box-in-uniq.rs index b25d7316801..139466bf40a 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-uniq.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-uniq.rs @@ -28,7 +28,7 @@ pub fn main() { assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x))); *x = @F{f: ~4}; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(*b_x)) as uint); assert_eq!(*b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x))); diff --git a/src/test/run-pass/borrowck-preserve-box.rs b/src/test/run-pass/borrowck-preserve-box.rs index ec57194cb43..f852f36d633 100644 --- a/src/test/run-pass/borrowck-preserve-box.rs +++ b/src/test/run-pass/borrowck-preserve-box.rs @@ -26,7 +26,7 @@ pub fn main() { assert_eq!(ptr::to_unsafe_ptr(&(*x)), ptr::to_unsafe_ptr(&(*b_x))); x = @22; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(*b_x)) as uint); assert_eq!(*b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x)) != ptr::to_unsafe_ptr(&(*b_x))); diff --git a/src/test/run-pass/borrowck-preserve-cond-box.rs b/src/test/run-pass/borrowck-preserve-cond-box.rs index dc3718275fc..b9428daf152 100644 --- a/src/test/run-pass/borrowck-preserve-cond-box.rs +++ b/src/test/run-pass/borrowck-preserve-cond-box.rs @@ -25,13 +25,13 @@ fn testfn(cond: bool) { exp = 4; } - info!("*r = %d, exp = %d", *r, exp); + info2!("*r = {}, exp = {}", *r, exp); assert_eq!(*r, exp); x = @5; y = @6; - info!("*r = %d, exp = %d", *r, exp); + info2!("*r = {}, exp = {}", *r, exp); assert_eq!(*r, exp); assert_eq!(x, @5); assert_eq!(y, @6); diff --git a/src/test/run-pass/borrowck-preserve-expl-deref.rs b/src/test/run-pass/borrowck-preserve-expl-deref.rs index 94b8f70b759..fec85757493 100644 --- a/src/test/run-pass/borrowck-preserve-expl-deref.rs +++ b/src/test/run-pass/borrowck-preserve-expl-deref.rs @@ -28,7 +28,7 @@ pub fn main() { assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x))); x = @F {f: ~4}; - info!("ptr::to_unsafe_ptr(*b_x) = %x", + info2!("ptr::to_unsafe_ptr(*b_x) = {:x}", ptr::to_unsafe_ptr(&(*b_x)) as uint); assert_eq!(*b_x, 3); assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x))); diff --git a/src/test/run-pass/borrowck-unary-move-2.rs b/src/test/run-pass/borrowck-unary-move-2.rs index 87d42943fac..6d16fd838f8 100644 --- a/src/test/run-pass/borrowck-unary-move-2.rs +++ b/src/test/run-pass/borrowck-unary-move-2.rs @@ -14,7 +14,7 @@ struct noncopyable { impl Drop for noncopyable { fn drop(&mut self) { - error!("dropped"); + error2!("dropped"); } } diff --git a/src/test/run-pass/box-inside-if.rs b/src/test/run-pass/box-inside-if.rs index ea2b7d58a11..249e9a47164 100644 --- a/src/test/run-pass/box-inside-if.rs +++ b/src/test/run-pass/box-inside-if.rs @@ -19,7 +19,7 @@ fn is_odd(_n: int) -> bool { return true; } fn length_is_even(_vs: @int) -> bool { return true; } fn foo(_acc: int, n: int) { - if is_odd(n) && length_is_even(some_box(1)) { error!("bloop"); } + if is_odd(n) && length_is_even(some_box(1)) { error2!("bloop"); } } pub fn main() { foo(67, 5); } diff --git a/src/test/run-pass/box-inside-if2.rs b/src/test/run-pass/box-inside-if2.rs index 53b46847060..a4563c33331 100644 --- a/src/test/run-pass/box-inside-if2.rs +++ b/src/test/run-pass/box-inside-if2.rs @@ -19,7 +19,7 @@ fn is_odd(_n: int) -> bool { return true; } fn length_is_even(_vs: @int) -> bool { return true; } fn foo(_acc: int, n: int) { - if is_odd(n) || length_is_even(some_box(1)) { error!("bloop"); } + if is_odd(n) || length_is_even(some_box(1)) { error2!("bloop"); } } pub fn main() { foo(67, 5); } diff --git a/src/test/run-pass/box-unbox.rs b/src/test/run-pass/box-unbox.rs index 2e92395d549..f5d522470d3 100644 --- a/src/test/run-pass/box-unbox.rs +++ b/src/test/run-pass/box-unbox.rs @@ -17,6 +17,6 @@ fn unbox(b: Box) -> T { return (*b.c).clone(); } pub fn main() { let foo: int = 17; let bfoo: Box = Box {c: @foo}; - info!("see what's in our box"); + info2!("see what's in our box"); assert_eq!(unbox::(bfoo), foo); } diff --git a/src/test/run-pass/boxed-class-type-substitution.rs b/src/test/run-pass/boxed-class-type-substitution.rs index 81bd3b6c139..e9be0904d4e 100644 --- a/src/test/run-pass/boxed-class-type-substitution.rs +++ b/src/test/run-pass/boxed-class-type-substitution.rs @@ -15,7 +15,7 @@ struct Tree { parent: Option } -fn empty() -> Tree { fail!() } +fn empty() -> Tree { fail2!() } struct Box { tree: Tree<@Box> diff --git a/src/test/run-pass/bug-7183-generics.rs b/src/test/run-pass/bug-7183-generics.rs index 45f4302a5af..3e89ac8bd38 100644 --- a/src/test/run-pass/bug-7183-generics.rs +++ b/src/test/run-pass/bug-7183-generics.rs @@ -19,14 +19,14 @@ fn hello(s:&S) -> ~str{ impl Speak for int { fn say(&self, s:&str) -> ~str { - fmt!("%s: %d", s, *self) + format!("{}: {}", s, *self) } } impl Speak for Option { fn say(&self, s:&str) -> ~str { match *self { - None => fmt!("%s - none", s), + None => format!("{} - none", s), Some(ref x) => { ~"something!" + x.say(s) } } } diff --git a/src/test/run-pass/cast-region-to-uint.rs b/src/test/run-pass/cast-region-to-uint.rs index 7472e0ca73a..69ca1584c12 100644 --- a/src/test/run-pass/cast-region-to-uint.rs +++ b/src/test/run-pass/cast-region-to-uint.rs @@ -12,5 +12,5 @@ use std::borrow; pub fn main() { let x = 3; - info!("&x=%x", borrow::to_uint(&x)); + info2!("&x={:x}", borrow::to_uint(&x)); } diff --git a/src/test/run-pass/cci_borrow.rs b/src/test/run-pass/cci_borrow.rs index c5fa8bba1a5..3db000accec 100644 --- a/src/test/run-pass/cci_borrow.rs +++ b/src/test/run-pass/cci_borrow.rs @@ -17,6 +17,6 @@ use cci_borrow_lib::foo; pub fn main() { let p = @22u; let r = foo(p); - info!("r=%u", r); + info2!("r={}", r); assert_eq!(r, 22u); } diff --git a/src/test/run-pass/class-attributes-1.rs b/src/test/run-pass/class-attributes-1.rs index 2165f73c3bf..3e7cae395d4 100644 --- a/src/test/run-pass/class-attributes-1.rs +++ b/src/test/run-pass/class-attributes-1.rs @@ -16,7 +16,7 @@ struct cat { impl Drop for cat { #[cat_dropper] - fn drop(&mut self) { error!("%s landed on hir feet" , self . name); } + fn drop(&mut self) { error2!("{} landed on hir feet" , self . name); } } diff --git a/src/test/run-pass/class-attributes-2.rs b/src/test/run-pass/class-attributes-2.rs index 30cafff0388..0a3f1539333 100644 --- a/src/test/run-pass/class-attributes-2.rs +++ b/src/test/run-pass/class-attributes-2.rs @@ -18,7 +18,7 @@ impl Drop for cat { Actually, cats don't always land on their feet when you drop them. */ fn drop(&mut self) { - error!("%s landed on hir feet", self.name); + error2!("{} landed on hir feet", self.name); } } diff --git a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs index d81e6fc6878..ac8c74f2da5 100644 --- a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs +++ b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs @@ -16,7 +16,7 @@ use cci_class_cast::kitty::*; fn print_out(thing: @ToStr, expected: ~str) { let actual = thing.to_str(); - info!("%s", actual); + info2!("{}", actual); assert_eq!(actual, expected); } diff --git a/src/test/run-pass/class-cast-to-trait-multiple-types.rs b/src/test/run-pass/class-cast-to-trait-multiple-types.rs index dd63d969077..3828fbd4395 100644 --- a/src/test/run-pass/class-cast-to-trait-multiple-types.rs +++ b/src/test/run-pass/class-cast-to-trait-multiple-types.rs @@ -20,7 +20,7 @@ struct dog { impl dog { fn bark(&self) -> int { - info!("Woof %u %d", *self.barks, *self.volume); + info2!("Woof {} {}", *self.barks, *self.volume); *self.barks += 1u; if *self.barks % 3u == 0u { *self.volume += 1; @@ -28,7 +28,7 @@ impl dog { if *self.barks % 10u == 0u { *self.volume -= 2; } - info!("Grrr %u %d", *self.barks, *self.volume); + info2!("Grrr {} {}", *self.barks, *self.volume); *self.volume } } @@ -62,7 +62,7 @@ impl cat { impl cat { fn meow(&self) -> uint { - info!("Meow"); + info2!("Meow"); *self.meows += 1u; if *self.meows % 5u == 0u { *self.how_hungry += 1; diff --git a/src/test/run-pass/class-cast-to-trait.rs b/src/test/run-pass/class-cast-to-trait.rs index 737253a956f..69a94e09d5f 100644 --- a/src/test/run-pass/class-cast-to-trait.rs +++ b/src/test/run-pass/class-cast-to-trait.rs @@ -25,12 +25,12 @@ impl noisy for cat { impl cat { pub fn eat(&mut 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; } } @@ -38,7 +38,7 @@ impl cat { impl cat { fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index 03dd33b08e2..baa82dbb2de 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -38,11 +38,11 @@ impl cat { pub fn eat(&mut 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; } } @@ -75,7 +75,7 @@ impl MutableMap for cat { true } - fn find_mut<'a>(&'a mut self, _k: &int) -> Option<&'a mut T> { fail!() } + fn find_mut<'a>(&'a mut self, _k: &int) -> Option<&'a mut T> { fail2!() } fn remove(&mut self, k: &int) -> bool { if self.find(k).is_some() { @@ -85,16 +85,16 @@ impl MutableMap for cat { } } - fn pop(&mut self, _k: &int) -> Option { fail!() } + fn pop(&mut self, _k: &int) -> Option { fail2!() } - fn swap(&mut self, _k: int, _v: T) -> Option { fail!() } + fn swap(&mut self, _k: int, _v: T) -> Option { fail2!() } } impl cat { pub fn get<'a>(&'a self, k: &int) -> &'a T { match self.find(k) { Some(v) => { v } - None => { fail!("epic fail"); } + None => { fail2!("epic fail"); } } } @@ -106,7 +106,7 @@ impl cat { impl cat { fn meow(&mut self) { self.meows += 1; - error!("Meow %d", self.meows); + error2!("Meow {}", self.meows); if self.meows % 5 == 0 { self.how_hungry += 1; } diff --git a/src/test/run-pass/class-implement-trait-cross-crate.rs b/src/test/run-pass/class-implement-trait-cross-crate.rs index 9443904b46d..78dcdba2895 100644 --- a/src/test/run-pass/class-implement-trait-cross-crate.rs +++ b/src/test/run-pass/class-implement-trait-cross-crate.rs @@ -23,12 +23,12 @@ struct cat { impl cat { pub fn eat(&mut 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(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; diff --git a/src/test/run-pass/class-implement-traits.rs b/src/test/run-pass/class-implement-traits.rs index 433d7f7a22f..1433b5a8024 100644 --- a/src/test/run-pass/class-implement-traits.rs +++ b/src/test/run-pass/class-implement-traits.rs @@ -24,7 +24,7 @@ struct cat { impl cat { fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; @@ -35,11 +35,11 @@ impl cat { impl cat { pub fn eat(&mut 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; } } diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs index 5555125a03b..5ef0569cf10 100644 --- a/src/test/run-pass/class-separate-impl.rs +++ b/src/test/run-pass/class-separate-impl.rs @@ -21,12 +21,12 @@ impl cat { pub fn eat(&mut 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; } } @@ -34,7 +34,7 @@ impl cat { impl cat { fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; @@ -58,7 +58,7 @@ impl ToStr for cat { fn print_out(thing: @ToStr, expected: ~str) { let actual = thing.to_str(); - info!("%s", actual); + info2!("{}", actual); assert_eq!(actual, expected); } diff --git a/src/test/run-pass/classes.rs b/src/test/run-pass/classes.rs index e5220b15520..14acd1c9115 100644 --- a/src/test/run-pass/classes.rs +++ b/src/test/run-pass/classes.rs @@ -20,11 +20,11 @@ impl cat { pub fn eat(&mut 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; } } @@ -32,7 +32,7 @@ impl cat { impl cat { fn meow(&mut self) { - error!("Meow"); + error2!("Meow"); self.meows += 1u; if self.meows % 5u == 0u { self.how_hungry += 1; diff --git a/src/test/run-pass/cleanup-copy-mode.rs b/src/test/run-pass/cleanup-copy-mode.rs index 70f70430bb9..6381a402cfd 100644 --- a/src/test/run-pass/cleanup-copy-mode.rs +++ b/src/test/run-pass/cleanup-copy-mode.rs @@ -11,7 +11,7 @@ use std::task; fn adder(x: @int, y: @int) -> int { return *x + *y; } -fn failer() -> @int { fail!(); } +fn failer() -> @int { fail2!(); } pub fn main() { assert!(task::try(|| { adder(@2, failer()); () diff --git a/src/test/run-pass/close-over-big-then-small-data.rs b/src/test/run-pass/close-over-big-then-small-data.rs index 8b7967ac150..4b6b3cca334 100644 --- a/src/test/run-pass/close-over-big-then-small-data.rs +++ b/src/test/run-pass/close-over-big-then-small-data.rs @@ -40,7 +40,7 @@ fn f(a: A, b: u16) -> @Invokable { pub fn main() { let (a, b) = f(22_u64, 44u16).f(); - info!("a=%? b=%?", a, b); + info2!("a={:?} b={:?}", a, b); assert_eq!(a, 22u64); assert_eq!(b, 44u16); } diff --git a/src/test/run-pass/comm.rs b/src/test/run-pass/comm.rs index ac9501a7110..63c1f4ed3d6 100644 --- a/src/test/run-pass/comm.rs +++ b/src/test/run-pass/comm.rs @@ -15,13 +15,13 @@ pub fn main() { let (p, ch) = stream(); let _t = task::spawn(|| child(&ch) ); let y = p.recv(); - error!("received"); - error!(y); + error2!("received"); + error2!("{:?}", y); assert_eq!(y, 10); } fn child(c: &Chan) { - error!("sending"); + error2!("sending"); c.send(10); - error!("value sent"); + error2!("value sent"); } diff --git a/src/test/run-pass/complex.rs b/src/test/run-pass/complex.rs index 7a085c5d3e2..f395c6b7151 100644 --- a/src/test/run-pass/complex.rs +++ b/src/test/run-pass/complex.rs @@ -37,7 +37,7 @@ fn foo(x: int) -> int { pub fn main() { let x: int = 2 + 2; - info!("%?", x); - info!("hello, world"); - info!("%?", 10); + info2!("{}", x); + info2!("hello, world"); + info2!("{}", 10); } diff --git a/src/test/run-pass/conditional-debug-macro-off.rs b/src/test/run-pass/conditional-debug-macro-off.rs index 1aae5ce29c0..17062757286 100644 --- a/src/test/run-pass/conditional-debug-macro-off.rs +++ b/src/test/run-pass/conditional-debug-macro-off.rs @@ -14,5 +14,5 @@ fn main() { // only fails if debug! evaluates its argument. - debug!({ if true { fail!() } }); + debug2!("{:?}", { if true { fail2!() } }); } diff --git a/src/test/run-pass/conditional-debug-macro-on.rs b/src/test/run-pass/conditional-debug-macro-on.rs index 2fe6d179348..dec79f0cb5b 100644 --- a/src/test/run-pass/conditional-debug-macro-on.rs +++ b/src/test/run-pass/conditional-debug-macro-on.rs @@ -14,7 +14,7 @@ fn main() { // exits early if debug! evaluates its arguments, otherwise it // will hit the fail. - debug!({ if true { return; } }); + debug2!("{:?}", { if true { return; } }); - fail!(); + fail2!(); } diff --git a/src/test/run-pass/const-big-enum.rs b/src/test/run-pass/const-big-enum.rs index ac2e879ceac..0a5a42116b9 100644 --- a/src/test/run-pass/const-big-enum.rs +++ b/src/test/run-pass/const-big-enum.rs @@ -19,18 +19,18 @@ static X: Foo = Baz; pub fn main() { match X { Baz => {} - _ => fail!() + _ => fail2!() } match Y { Bar(s) => assert!(s == 2654435769), - _ => fail!() + _ => fail2!() } match Z { Quux(d,h) => { assert_eq!(d, 0x123456789abcdef0); assert_eq!(h, 0x1234); } - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/const-enum-byref-self.rs b/src/test/run-pass/const-enum-byref-self.rs index 098a001cfcd..25e4b7189f2 100644 --- a/src/test/run-pass/const-enum-byref-self.rs +++ b/src/test/run-pass/const-enum-byref-self.rs @@ -15,7 +15,7 @@ impl E { pub fn method(&self) { match *self { V => {} - VV(*) => fail!() + VV(*) => fail2!() } } } diff --git a/src/test/run-pass/const-enum-byref.rs b/src/test/run-pass/const-enum-byref.rs index 83fafad4f99..22ec61f8544 100644 --- a/src/test/run-pass/const-enum-byref.rs +++ b/src/test/run-pass/const-enum-byref.rs @@ -14,7 +14,7 @@ static C: E = V; fn f(a: &E) { match *a { V => {} - VV(*) => fail!() + VV(*) => fail2!() } } diff --git a/src/test/run-pass/const-enum-ptr.rs b/src/test/run-pass/const-enum-ptr.rs index c1e3889d613..c75d1728ca9 100644 --- a/src/test/run-pass/const-enum-ptr.rs +++ b/src/test/run-pass/const-enum-ptr.rs @@ -14,6 +14,6 @@ static C: &'static E = &V0; pub fn main() { match *C { V0 => (), - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/const-enum-structlike.rs b/src/test/run-pass/const-enum-structlike.rs index cc9d24e16db..05f54d6bd7e 100644 --- a/src/test/run-pass/const-enum-structlike.rs +++ b/src/test/run-pass/const-enum-structlike.rs @@ -17,7 +17,7 @@ static C: E = S1 { u: 23 }; pub fn main() { match C { - S0 { _ } => fail!(), + S0 { _ } => fail2!(), S1 { u } => assert!(u == 23) } } diff --git a/src/test/run-pass/const-enum-vec-index.rs b/src/test/run-pass/const-enum-vec-index.rs index 4c81eaae1d8..5b4ce1bc4ef 100644 --- a/src/test/run-pass/const-enum-vec-index.rs +++ b/src/test/run-pass/const-enum-vec-index.rs @@ -16,10 +16,10 @@ static C1: E = C[1]; pub fn main() { match C0 { V0 => (), - _ => fail!() + _ => fail2!() } match C1 { V1(n) => assert!(n == 0xDEADBEE), - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/const-enum-vec-ptr.rs b/src/test/run-pass/const-enum-vec-ptr.rs index 95c4ed836c7..8b905042f7f 100644 --- a/src/test/run-pass/const-enum-vec-ptr.rs +++ b/src/test/run-pass/const-enum-vec-ptr.rs @@ -14,10 +14,10 @@ static C: &'static [E] = &[V0, V1(0xDEADBEE), V0]; pub fn main() { match C[1] { V1(n) => assert!(n == 0xDEADBEE), - _ => fail!() + _ => fail2!() } match C[2] { V0 => (), - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/const-enum-vector.rs b/src/test/run-pass/const-enum-vector.rs index 3dc5b918f7f..cff5d4689e4 100644 --- a/src/test/run-pass/const-enum-vector.rs +++ b/src/test/run-pass/const-enum-vector.rs @@ -14,10 +14,10 @@ static C: [E, ..3] = [V0, V1(0xDEADBEE), V0]; pub fn main() { match C[1] { V1(n) => assert!(n == 0xDEADBEE), - _ => fail!() + _ => fail2!() } match C[2] { V0 => (), - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/const-nullary-enum.rs b/src/test/run-pass/const-nullary-enum.rs index bc61c8e9aec..ac9a7fa6552 100644 --- a/src/test/run-pass/const-nullary-enum.rs +++ b/src/test/run-pass/const-nullary-enum.rs @@ -19,11 +19,11 @@ static X: Foo = Bar; pub fn main() { match X { Bar => {} - Baz | Boo => fail!() + Baz | Boo => fail2!() } match Y { Baz => {} - Bar | Boo => fail!() + Bar | Boo => fail2!() } } diff --git a/src/test/run-pass/const.rs b/src/test/run-pass/const.rs index 402277c19b3..5696c163fc5 100644 --- a/src/test/run-pass/const.rs +++ b/src/test/run-pass/const.rs @@ -12,4 +12,4 @@ static i: int = 10; -pub fn main() { info!("%i", i); } +pub fn main() { info2!("{}", i); } diff --git a/src/test/run-pass/core-rt-smoke.rs b/src/test/run-pass/core-rt-smoke.rs index 6e3d9629da0..0260edf1182 100644 --- a/src/test/run-pass/core-rt-smoke.rs +++ b/src/test/run-pass/core-rt-smoke.rs @@ -15,6 +15,6 @@ #[start] fn start(argc: int, argv: **u8) -> int { do std::rt::start(argc, argv) { - info!("creating my own runtime is joy"); + info2!("creating my own runtime is joy"); } } diff --git a/src/test/run-pass/dead-code-one-arm-if.rs b/src/test/run-pass/dead-code-one-arm-if.rs index 2749fc31cea..9a2819c2293 100644 --- a/src/test/run-pass/dead-code-one-arm-if.rs +++ b/src/test/run-pass/dead-code-one-arm-if.rs @@ -12,4 +12,4 @@ // -*- rust -*- -pub fn main() { if 1 == 1 { return; } info!("Paul is dead"); } +pub fn main() { if 1 == 1 { return; } info2!("Paul is dead"); } diff --git a/src/test/run-pass/deref-lval.rs b/src/test/run-pass/deref-lval.rs index e2f615b3ed2..bc0b51c6b5d 100644 --- a/src/test/run-pass/deref-lval.rs +++ b/src/test/run-pass/deref-lval.rs @@ -10,4 +10,4 @@ -pub fn main() { let x = @mut 5; *x = 1000; info!("%?", *x); } +pub fn main() { let x = @mut 5; *x = 1000; info2!("{:?}", *x); } diff --git a/src/test/run-pass/deriving-cmp-shortcircuit.rs b/src/test/run-pass/deriving-cmp-shortcircuit.rs index 431c856ee88..940ddc31f46 100644 --- a/src/test/run-pass/deriving-cmp-shortcircuit.rs +++ b/src/test/run-pass/deriving-cmp-shortcircuit.rs @@ -14,19 +14,19 @@ pub struct FailCmp; impl Eq for FailCmp { - fn eq(&self, _: &FailCmp) -> bool { fail!("eq") } + fn eq(&self, _: &FailCmp) -> bool { fail2!("eq") } } impl Ord for FailCmp { - fn lt(&self, _: &FailCmp) -> bool { fail!("lt") } + fn lt(&self, _: &FailCmp) -> bool { fail2!("lt") } } impl TotalEq for FailCmp { - fn equals(&self, _: &FailCmp) -> bool { fail!("equals") } + fn equals(&self, _: &FailCmp) -> bool { fail2!("equals") } } impl TotalOrd for FailCmp { - fn cmp(&self, _: &FailCmp) -> Ordering { fail!("cmp") } + fn cmp(&self, _: &FailCmp) -> Ordering { fail2!("cmp") } } #[deriving(Eq,Ord,TotalEq,TotalOrd)] diff --git a/src/test/run-pass/die-macro.rs b/src/test/run-pass/die-macro.rs index f08e5f054a9..ade01142c35 100644 --- a/src/test/run-pass/die-macro.rs +++ b/src/test/run-pass/die-macro.rs @@ -3,9 +3,9 @@ #[allow(unreachable_code)]; fn f() { - fail!(); + fail2!(); - let _x: int = fail!(); + let _x: int = fail2!(); } pub fn main() { diff --git a/src/test/run-pass/enum-alignment.rs b/src/test/run-pass/enum-alignment.rs index 58a91d4dbce..a36aaaf936d 100644 --- a/src/test/run-pass/enum-alignment.rs +++ b/src/test/run-pass/enum-alignment.rs @@ -27,7 +27,7 @@ fn is_aligned(ptr: &T) -> bool { pub fn main() { let x = Some(0u64); match x { - None => fail!(), + None => fail2!(), Some(ref y) => assert!(is_aligned(y)) } } diff --git a/src/test/run-pass/enum-discrim-width-stuff.rs b/src/test/run-pass/enum-discrim-width-stuff.rs index a0b180f6e6d..71f0b0f9475 100644 --- a/src/test/run-pass/enum-discrim-width-stuff.rs +++ b/src/test/run-pass/enum-discrim-width-stuff.rs @@ -20,6 +20,6 @@ pub fn main() { }; assert_eq!(expected, V as u64); assert_eq!(expected, C as u64); - assert_eq!(fmt!("%?", V), ~"V"); - assert_eq!(fmt!("%?", C), ~"V"); + assert_eq!(format!("{:?}", V), ~"V"); + assert_eq!(format!("{:?}", C), ~"V"); } diff --git a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs index 4764dbb9417..334047d6ca6 100644 --- a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs +++ b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs @@ -19,6 +19,6 @@ pub fn main() { match Cons(10, @Nil) { Cons(10, _) => {} Nil => {} - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/estr-slice.rs b/src/test/run-pass/estr-slice.rs index ca2039feded..145f04009d1 100644 --- a/src/test/run-pass/estr-slice.rs +++ b/src/test/run-pass/estr-slice.rs @@ -14,8 +14,8 @@ pub fn main() { let v = &"hello"; let y : &str = &"there"; - info!(x); - info!(y); + info2!("{}", x); + info2!("{}", y); assert_eq!(x[0], 'h' as u8); assert_eq!(x[4], 'o' as u8); @@ -30,7 +30,7 @@ pub fn main() { let c = &"cccc"; let cc = &"ccccc"; - info!(a); + info2!("{}", a); assert!(a < b); assert!(a <= b); @@ -38,7 +38,7 @@ pub fn main() { assert!(b >= a); assert!(b > a); - info!(b); + info2!("{}", b); assert!(a < c); assert!(a <= c); @@ -46,7 +46,7 @@ pub fn main() { assert!(c >= a); assert!(c > a); - info!(c); + info2!("{}", c); assert!(c < cc); assert!(c <= cc); @@ -54,5 +54,5 @@ pub fn main() { assert!(cc >= c); assert!(cc > c); - info!(cc); + info2!("{}", cc); } diff --git a/src/test/run-pass/evec-slice.rs b/src/test/run-pass/evec-slice.rs index 4a14faf1f84..32de1ad79b2 100644 --- a/src/test/run-pass/evec-slice.rs +++ b/src/test/run-pass/evec-slice.rs @@ -22,7 +22,7 @@ pub fn main() { let c : &[int] = &[2,2,2,2,3]; let cc : &[int] = &[2,2,2,2,2,2]; - info!(a); + info2!("{:?}", a); assert!(a < b); assert!(a <= b); @@ -30,7 +30,7 @@ pub fn main() { assert!(b >= a); assert!(b > a); - info!(b); + info2!("{:?}", b); assert!(b < c); assert!(b <= c); @@ -44,7 +44,7 @@ pub fn main() { assert!(c >= a); assert!(c > a); - info!(c); + info2!("{:?}", c); assert!(a < cc); assert!(a <= cc); @@ -52,5 +52,5 @@ pub fn main() { assert!(cc >= a); assert!(cc > a); - info!(cc); + info2!("{:?}", cc); } diff --git a/src/test/run-pass/export-non-interference2.rs b/src/test/run-pass/export-non-interference2.rs index 95d61e08eb8..9147596b0db 100644 --- a/src/test/run-pass/export-non-interference2.rs +++ b/src/test/run-pass/export-non-interference2.rs @@ -13,7 +13,7 @@ mod foo { pub fn y() { super::super::foo::x(); } } - pub fn x() { info!("x"); } + pub fn x() { info2!("x"); } } pub fn main() { self::foo::bar::y(); } diff --git a/src/test/run-pass/export-non-interference3.rs b/src/test/run-pass/export-non-interference3.rs index e2af3121f16..b06323741a5 100644 --- a/src/test/run-pass/export-non-interference3.rs +++ b/src/test/run-pass/export-non-interference3.rs @@ -15,7 +15,7 @@ pub mod foo { } pub mod bar { - pub fn x() { info!("x"); } + pub fn x() { info2!("x"); } } pub fn main() { foo::x(); } diff --git a/src/test/run-pass/expr-block-generic-box1.rs b/src/test/run-pass/expr-block-generic-box1.rs index 12b387b7eae..710cab50fba 100644 --- a/src/test/run-pass/expr-block-generic-box1.rs +++ b/src/test/run-pass/expr-block-generic-box1.rs @@ -21,8 +21,8 @@ fn test_generic(expected: @T, eq: compare) { fn test_box() { fn compare_box(b1: @bool, b2: @bool) -> bool { - info!(*b1); - info!(*b2); + info2!("{}", *b1); + info2!("{}", *b2); return *b1 == *b2; } test_generic::(@true, compare_box); diff --git a/src/test/run-pass/expr-block-generic-unique1.rs b/src/test/run-pass/expr-block-generic-unique1.rs index 3f9c101761f..f22ef2138ff 100644 --- a/src/test/run-pass/expr-block-generic-unique1.rs +++ b/src/test/run-pass/expr-block-generic-unique1.rs @@ -20,8 +20,8 @@ fn test_generic(expected: ~T, eq: compare) { fn test_box() { fn compare_box(b1: ~bool, b2: ~bool) -> bool { - info!(*b1); - info!(*b2); + info2!("{}", *b1); + info2!("{}", *b2); return *b1 == *b2; } test_generic::(~true, compare_box); diff --git a/src/test/run-pass/expr-if-fail-all.rs b/src/test/run-pass/expr-if-fail-all.rs index a34620d2e1b..b19b9ceaa00 100644 --- a/src/test/run-pass/expr-if-fail-all.rs +++ b/src/test/run-pass/expr-if-fail-all.rs @@ -14,6 +14,6 @@ pub fn main() { let _x = if true { 10 } else { - if true { fail!() } else { fail!() } + if true { fail2!() } else { fail2!() } }; } diff --git a/src/test/run-pass/expr-if-fail.rs b/src/test/run-pass/expr-if-fail.rs index f79b7198b50..966a1db1d0e 100644 --- a/src/test/run-pass/expr-if-fail.rs +++ b/src/test/run-pass/expr-if-fail.rs @@ -8,15 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn test_if_fail() { let x = if false { fail!() } else { 10 }; assert!((x == 10)); } +fn test_if_fail() { let x = if false { fail2!() } else { 10 }; assert!((x == 10)); } fn test_else_fail() { - let x = if true { 10 } else { fail!() }; + let x = if true { 10 } else { fail2!() }; assert_eq!(x, 10); } fn test_elseif_fail() { - let x = if false { 0 } else if false { fail!() } else { 10 }; + let x = if false { 0 } else if false { fail2!() } else { 10 }; assert_eq!(x, 10); } diff --git a/src/test/run-pass/expr-match-box.rs b/src/test/run-pass/expr-match-box.rs index 84a78637187..6f638758ed8 100644 --- a/src/test/run-pass/expr-match-box.rs +++ b/src/test/run-pass/expr-match-box.rs @@ -15,13 +15,13 @@ // Tests for match as expressions resulting in boxed types fn test_box() { - let res = match true { true => { @100 } _ => fail!("wat") }; + let res = match true { true => { @100 } _ => fail2!("wat") }; assert_eq!(*res, 100); } fn test_str() { let res = match true { true => { ~"happy" }, - _ => fail!("not happy at all") }; + _ => fail2!("not happy at all") }; assert_eq!(res, ~"happy"); } diff --git a/src/test/run-pass/expr-match-fail-all.rs b/src/test/run-pass/expr-match-fail-all.rs index aef11a78e0d..418031243ee 100644 --- a/src/test/run-pass/expr-match-fail-all.rs +++ b/src/test/run-pass/expr-match-fail-all.rs @@ -17,6 +17,6 @@ pub fn main() { let _x = match true { true => { 10 } - false => { match true { true => { fail!() } false => { fail!() } } } + false => { match true { true => { fail2!() } false => { fail2!() } } } }; } diff --git a/src/test/run-pass/expr-match-fail.rs b/src/test/run-pass/expr-match-fail.rs index 3e1b96763e1..c1081561b6f 100644 --- a/src/test/run-pass/expr-match-fail.rs +++ b/src/test/run-pass/expr-match-fail.rs @@ -9,12 +9,12 @@ // except according to those terms. fn test_simple() { - let r = match true { true => { true } false => { fail!() } }; + let r = match true { true => { true } false => { fail2!() } }; assert_eq!(r, true); } fn test_box() { - let r = match true { true => { ~[10] } false => { fail!() } }; + let r = match true { true => { ~[10] } false => { fail2!() } }; assert_eq!(r[0], 10); } diff --git a/src/test/run-pass/expr-match-generic-box1.rs b/src/test/run-pass/expr-match-generic-box1.rs index 064e3343620..e70a18a7f6d 100644 --- a/src/test/run-pass/expr-match-generic-box1.rs +++ b/src/test/run-pass/expr-match-generic-box1.rs @@ -15,7 +15,7 @@ type compare = &'static fn(@T, @T) -> bool; fn test_generic(expected: @T, eq: compare) { - let actual: @T = match true { true => { expected }, _ => fail!() }; + let actual: @T = match true { true => { expected }, _ => fail2!() }; assert!((eq(expected, actual))); } diff --git a/src/test/run-pass/expr-match-generic-box2.rs b/src/test/run-pass/expr-match-generic-box2.rs index bca06ebdbb5..92e13e36d07 100644 --- a/src/test/run-pass/expr-match-generic-box2.rs +++ b/src/test/run-pass/expr-match-generic-box2.rs @@ -14,7 +14,7 @@ type compare = &'static fn(T, T) -> bool; fn test_generic(expected: T, eq: compare) { - let actual: T = match true { true => { expected.clone() }, _ => fail!("wat") }; + let actual: T = match true { true => { expected.clone() }, _ => fail2!("wat") }; assert!((eq(expected, actual))); } diff --git a/src/test/run-pass/expr-match-generic-unique1.rs b/src/test/run-pass/expr-match-generic-unique1.rs index 7371f8fd89b..e4a6fa516c5 100644 --- a/src/test/run-pass/expr-match-generic-unique1.rs +++ b/src/test/run-pass/expr-match-generic-unique1.rs @@ -16,7 +16,7 @@ type compare = &'static fn(~T, ~T) -> bool; fn test_generic(expected: ~T, eq: compare) { let actual: ~T = match true { true => { expected.clone() }, - _ => fail!("wat") + _ => fail2!("wat") }; assert!((eq(expected, actual))); } diff --git a/src/test/run-pass/expr-match-generic-unique2.rs b/src/test/run-pass/expr-match-generic-unique2.rs index d07d40e6757..09278fad75c 100644 --- a/src/test/run-pass/expr-match-generic-unique2.rs +++ b/src/test/run-pass/expr-match-generic-unique2.rs @@ -16,7 +16,7 @@ type compare<'self, T> = &'self fn(T, T) -> bool; fn test_generic(expected: T, eq: compare) { let actual: T = match true { true => expected.clone(), - _ => fail!("wat") + _ => fail2!("wat") }; assert!((eq(expected, actual))); } diff --git a/src/test/run-pass/expr-match-generic.rs b/src/test/run-pass/expr-match-generic.rs index b43085d346f..d98cd130022 100644 --- a/src/test/run-pass/expr-match-generic.rs +++ b/src/test/run-pass/expr-match-generic.rs @@ -14,7 +14,7 @@ type compare = extern "Rust" fn(T, T) -> bool; fn test_generic(expected: T, eq: compare) { - let actual: T = match true { true => { expected.clone() }, _ => fail!("wat") }; + let actual: T = match true { true => { expected.clone() }, _ => fail2!("wat") }; assert!((eq(expected, actual))); } diff --git a/src/test/run-pass/expr-match-struct.rs b/src/test/run-pass/expr-match-struct.rs index 7cfcc38f8dd..7fa58a535b0 100644 --- a/src/test/run-pass/expr-match-struct.rs +++ b/src/test/run-pass/expr-match-struct.rs @@ -17,7 +17,7 @@ struct R { i: int } fn test_rec() { - let rs = match true { true => R {i: 100}, _ => fail!() }; + let rs = match true { true => R {i: 100}, _ => fail2!() }; assert_eq!(rs.i, 100); } diff --git a/src/test/run-pass/expr-match-unique.rs b/src/test/run-pass/expr-match-unique.rs index cdd4e45877a..7f610d1babd 100644 --- a/src/test/run-pass/expr-match-unique.rs +++ b/src/test/run-pass/expr-match-unique.rs @@ -15,7 +15,7 @@ // Tests for match as expressions resulting in boxed types fn test_box() { - let res = match true { true => { ~100 }, _ => fail!() }; + let res = match true { true => { ~100 }, _ => fail2!() }; assert_eq!(*res, 100); } diff --git a/src/test/run-pass/extern-call-deep.rs b/src/test/run-pass/extern-call-deep.rs index 1153cb4177d..41ae128626b 100644 --- a/src/test/run-pass/extern-call-deep.rs +++ b/src/test/run-pass/extern-call-deep.rs @@ -31,13 +31,13 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { #[fixed_stack_segment] fn count(n: uint) -> uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); rustrt::rust_dbg_call(cb, n) } } pub fn main() { let result = count(1000u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 1000u); } diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs index a8fa9c2cef0..0490949e8a4 100644 --- a/src/test/run-pass/extern-call-deep2.rs +++ b/src/test/run-pass/extern-call-deep2.rs @@ -32,7 +32,7 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { #[fixed_stack_segment] #[inline(never)] fn count(n: uint) -> uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); rustrt::rust_dbg_call(cb, n) } } @@ -42,7 +42,7 @@ pub fn main() { // has a large stack) do task::spawn { let result = count(1000u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 1000u); }; } diff --git a/src/test/run-pass/extern-call-indirect.rs b/src/test/run-pass/extern-call-indirect.rs index 9929cb447a6..733625f492e 100644 --- a/src/test/run-pass/extern-call-indirect.rs +++ b/src/test/run-pass/extern-call-indirect.rs @@ -31,13 +31,13 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { #[fixed_stack_segment] #[inline(never)] fn fact(n: uint) -> uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); rustrt::rust_dbg_call(cb, n) } } pub fn main() { let result = fact(10u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 3628800u); } diff --git a/src/test/run-pass/extern-call-scrub.rs b/src/test/run-pass/extern-call-scrub.rs index 4388ef65e98..74b1ed9a5c4 100644 --- a/src/test/run-pass/extern-call-scrub.rs +++ b/src/test/run-pass/extern-call-scrub.rs @@ -36,7 +36,7 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { #[fixed_stack_segment] #[inline(never)] fn count(n: uint) -> uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); rustrt::rust_dbg_call(cb, n) } } @@ -46,7 +46,7 @@ pub fn main() { // has a large stack) do task::spawn { let result = count(12u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 2048u); }; } diff --git a/src/test/run-pass/extern-crosscrate.rs b/src/test/run-pass/extern-crosscrate.rs index 7db7b898c0e..3367b795462 100644 --- a/src/test/run-pass/extern-crosscrate.rs +++ b/src/test/run-pass/extern-crosscrate.rs @@ -16,13 +16,13 @@ extern mod externcallback(vers = "0.1"); #[fixed_stack_segment] #[inline(never)] fn fact(n: uint) -> uint { unsafe { - info!("n = %?", n); + info2!("n = {}", n); externcallback::rustrt::rust_dbg_call(externcallback::cb, n) } } pub fn main() { let result = fact(10u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 3628800u); } diff --git a/src/test/run-pass/extern-yield.rs b/src/test/run-pass/extern-yield.rs index fd0807dffc8..7e71d416b55 100644 --- a/src/test/run-pass/extern-yield.rs +++ b/src/test/run-pass/extern-yield.rs @@ -41,7 +41,7 @@ pub fn main() { do 10u.times { do task::spawn { let result = count(5u); - info!("result = %?", result); + info2!("result = {}", result); assert_eq!(result, 16u); }; } diff --git a/src/test/run-pass/fact.rs b/src/test/run-pass/fact.rs index ff651effc8d..f0379e1dac1 100644 --- a/src/test/run-pass/fact.rs +++ b/src/test/run-pass/fact.rs @@ -15,7 +15,7 @@ fn f(x: int) -> int { // info!("in f:"); - info!(x); + info2!("{}", x); if x == 1 { // info!("bottoming out"); @@ -26,7 +26,7 @@ fn f(x: int) -> int { let y: int = x * f(x - 1); // info!("returned"); - info!(y); + info2!("{}", y); return y; } } diff --git a/src/test/run-pass/fat-arrow-match.rs b/src/test/run-pass/fat-arrow-match.rs index f6b49960fad..be945e93ec9 100644 --- a/src/test/run-pass/fat-arrow-match.rs +++ b/src/test/run-pass/fat-arrow-match.rs @@ -17,7 +17,7 @@ enum color { } pub fn main() { - error!(match red { + error2!("{}", match red { red => { 1 } green => { 2 } blue => { 3 } diff --git a/src/test/run-pass/float-signature.rs b/src/test/run-pass/float-signature.rs index f6a9e05d818..5193d1e559d 100644 --- a/src/test/run-pass/float-signature.rs +++ b/src/test/run-pass/float-signature.rs @@ -14,5 +14,5 @@ pub fn main() { fn foo(n: float) -> float { return n + 0.12345; } let n: float = 0.1; let m: float = foo(n); - info!(m); + info2!("{}", m); } diff --git a/src/test/run-pass/float.rs b/src/test/run-pass/float.rs index a9f1555ade4..1418255d601 100644 --- a/src/test/run-pass/float.rs +++ b/src/test/run-pass/float.rs @@ -12,9 +12,9 @@ pub fn main() { let pi = 3.1415927; - info!(-pi * (pi + 2.0 / pi) - pi * 5.0); + info2!("{:?}", -pi * (pi + 2.0 / pi) - pi * 5.0); if pi == 5.0 || pi < 10.0 || pi <= 2.0 || pi != 22.0 / 7.0 || pi >= 10.0 || pi > 1.0 { - info!("yes"); + info2!("yes"); } } diff --git a/src/test/run-pass/fn-bare-item.rs b/src/test/run-pass/fn-bare-item.rs index e01c7ee998c..be0f686c5a4 100644 --- a/src/test/run-pass/fn-bare-item.rs +++ b/src/test/run-pass/fn-bare-item.rs @@ -9,7 +9,7 @@ // except according to those terms. fn f() { - info!("This is a bare function"); + info2!("This is a bare function"); } pub fn main() { diff --git a/src/test/run-pass/for-loop-fail.rs b/src/test/run-pass/for-loop-fail.rs index ff718500340..9599c5852df 100644 --- a/src/test/run-pass/for-loop-fail.rs +++ b/src/test/run-pass/for-loop-fail.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub fn main() { let x: ~[int] = ~[]; for _ in x.iter() { fail!("moop"); } } +pub fn main() { let x: ~[int] = ~[]; for _ in x.iter() { fail2!("moop"); } } diff --git a/src/test/run-pass/foreach-put-structured.rs b/src/test/run-pass/foreach-put-structured.rs index bd3799e47e1..6e20bb20bd9 100644 --- a/src/test/run-pass/foreach-put-structured.rs +++ b/src/test/run-pass/foreach-put-structured.rs @@ -21,8 +21,8 @@ pub fn main() { let mut j: int = 0; do pairs() |p| { let (_0, _1) = p; - info!(_0); - info!(_1); + info2!("{}", _0); + info2!("{}", _1); assert_eq!(_0 + 10, i); i += 1; j = _1; diff --git a/src/test/run-pass/foreach-simple-outer-slot.rs b/src/test/run-pass/foreach-simple-outer-slot.rs index 9292c115705..b5fa186902e 100644 --- a/src/test/run-pass/foreach-simple-outer-slot.rs +++ b/src/test/run-pass/foreach-simple-outer-slot.rs @@ -14,13 +14,13 @@ // -*- rust -*- pub fn main() { let mut sum: int = 0; - do first_ten |i| { info!("main"); info!(i); sum = sum + i; } - info!("sum"); - info!(sum); + do first_ten |i| { info2!("main"); info2!("{}", i); sum = sum + i; } + info2!("sum"); + info2!("{}", sum); assert_eq!(sum, 45); } fn first_ten(it: &fn(int)) { let mut i: int = 0; - while i < 10 { info!("first_ten"); it(i); i = i + 1; } + while i < 10 { info2!("first_ten"); it(i); i = i + 1; } } diff --git a/src/test/run-pass/generic-alias-box.rs b/src/test/run-pass/generic-alias-box.rs index 2cd505f1f7d..b4412db1a58 100644 --- a/src/test/run-pass/generic-alias-box.rs +++ b/src/test/run-pass/generic-alias-box.rs @@ -15,6 +15,6 @@ fn id(t: T) -> T { return t; } pub fn main() { let expected = @100; let actual = id::<@int>(expected); - info!(*actual); + info2!("{:?}", *actual); assert_eq!(*expected, *actual); } diff --git a/src/test/run-pass/generic-alias-unique.rs b/src/test/run-pass/generic-alias-unique.rs index 7a6cb9470b2..ab50b70b1b8 100644 --- a/src/test/run-pass/generic-alias-unique.rs +++ b/src/test/run-pass/generic-alias-unique.rs @@ -15,6 +15,6 @@ fn id(t: T) -> T { return t; } pub fn main() { let expected = ~100; let actual = id::<~int>(expected.clone()); - info!(*actual); + info2!("{:?}", *actual); assert_eq!(*expected, *actual); } diff --git a/src/test/run-pass/generic-derived-type.rs b/src/test/run-pass/generic-derived-type.rs index 3c30a6b53af..7ce3dc7a03d 100644 --- a/src/test/run-pass/generic-derived-type.rs +++ b/src/test/run-pass/generic-derived-type.rs @@ -25,8 +25,8 @@ fn f(t: T) -> Pair { pub fn main() { let b = f::(10); - info!(b.a); - info!(b.b); + info2!("{:?}" ,b.a); + info2!("{:?}", b.b); assert_eq!(b.a, 10); assert_eq!(b.b, 10); } diff --git a/src/test/run-pass/generic-fn-box.rs b/src/test/run-pass/generic-fn-box.rs index 97905449fbe..c5d6d23d948 100644 --- a/src/test/run-pass/generic-fn-box.rs +++ b/src/test/run-pass/generic-fn-box.rs @@ -12,4 +12,4 @@ fn f(x: @T) -> @T { return x; } -pub fn main() { let x = f(@3); info!(*x); } +pub fn main() { let x = f(@3); info2!("{:?}", *x); } diff --git a/src/test/run-pass/generic-fn-unique.rs b/src/test/run-pass/generic-fn-unique.rs index 3c28b16d3a9..d4ba0ddfc8e 100644 --- a/src/test/run-pass/generic-fn-unique.rs +++ b/src/test/run-pass/generic-fn-unique.rs @@ -11,4 +11,4 @@ fn f(x: ~T) -> ~T { return x; } -pub fn main() { let x = f(~3); info!(*x); } +pub fn main() { let x = f(~3); info2!("{:?}", *x); } diff --git a/src/test/run-pass/generic-fn.rs b/src/test/run-pass/generic-fn.rs index d14ee82e45e..4d8b382b511 100644 --- a/src/test/run-pass/generic-fn.rs +++ b/src/test/run-pass/generic-fn.rs @@ -23,14 +23,14 @@ pub fn main() { let p: Triple = Triple {x: 65, y: 66, z: 67}; let mut q: Triple = Triple {x: 68, y: 69, z: 70}; y = id::(x); - info!(y); + info2!("{}", y); assert_eq!(x, y); b = id::(a); - info!(b); + info2!("{}", b); assert_eq!(a, b); q = id::(p); x = p.z; y = q.z; - info!(y); + info2!("{}", y); assert_eq!(x, y); } diff --git a/src/test/run-pass/generic-tag-match.rs b/src/test/run-pass/generic-tag-match.rs index f740d8cb2d1..7b3b1118974 100644 --- a/src/test/run-pass/generic-tag-match.rs +++ b/src/test/run-pass/generic-tag-match.rs @@ -14,7 +14,7 @@ enum foo { arm(T), } fn altfoo(f: foo) { let mut hit = false; - match f { arm::(_x) => { info!("in arm"); hit = true; } } + match f { arm::(_x) => { info2!("in arm"); hit = true; } } assert!((hit)); } diff --git a/src/test/run-pass/generic-tag-values.rs b/src/test/run-pass/generic-tag-values.rs index d132eb5d5a9..739eb9f0aca 100644 --- a/src/test/run-pass/generic-tag-values.rs +++ b/src/test/run-pass/generic-tag-values.rs @@ -18,12 +18,12 @@ struct Pair { x: int, y: int } pub fn main() { let nop: noption = some::(5); - match nop { some::(n) => { info!(n); assert!((n == 5)); } } + match nop { some::(n) => { info2!("{:?}", n); assert!((n == 5)); } } let nop2: noption = some(Pair{x: 17, y: 42}); match nop2 { some(t) => { - info!(t.x); - info!(t.y); + info2!("{:?}", t.x); + info2!("{:?}", t.y); assert_eq!(t.x, 17); assert_eq!(t.y, 42); } diff --git a/src/test/run-pass/generic-temporary.rs b/src/test/run-pass/generic-temporary.rs index 82c8a3e85c6..5143676f34a 100644 --- a/src/test/run-pass/generic-temporary.rs +++ b/src/test/run-pass/generic-temporary.rs @@ -12,7 +12,7 @@ fn mk() -> int { return 1; } -fn chk(a: int) { info!(a); assert!((a == 1)); } +fn chk(a: int) { info2!("{}", a); assert!((a == 1)); } fn apply(produce: extern fn() -> T, consume: extern fn(T)) { diff --git a/src/test/run-pass/generic-tup.rs b/src/test/run-pass/generic-tup.rs index 4a74330f7d6..f9f5da51196 100644 --- a/src/test/run-pass/generic-tup.rs +++ b/src/test/run-pass/generic-tup.rs @@ -11,7 +11,7 @@ fn get_third(t: (T, T, T)) -> T { let (_, _, x) = t; return x; } pub fn main() { - info!(get_third((1, 2, 3))); + info2!("{:?}", get_third((1, 2, 3))); assert_eq!(get_third((1, 2, 3)), 3); assert_eq!(get_third((5u8, 6u8, 7u8)), 7u8); } diff --git a/src/test/run-pass/getopts_ref.rs b/src/test/run-pass/getopts_ref.rs index d1964b5d94b..1f98b445b16 100644 --- a/src/test/run-pass/getopts_ref.rs +++ b/src/test/run-pass/getopts_ref.rs @@ -21,7 +21,7 @@ pub fn main() { match getopts(args, opts) { Ok(ref m) => assert!(!m.opt_present("b")), - Err(ref f) => fail!((*f).clone().to_err_msg()) + Err(ref f) => fail2!("{:?}", (*f).clone().to_err_msg()) }; } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 15286a85c01..bf79768c7be 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -47,11 +47,11 @@ mod map_reduce { return; } let (pp, cc) = stream(); - error!("sending find_reducer"); + error2!("sending find_reducer"); ctrl.send(find_reducer(key.as_bytes().to_owned(), cc)); - error!("receiving"); + error2!("receiving"); let c = pp.recv(); - error!(c); + error2!("{:?}", c); im.insert(key, c); } diff --git a/src/test/run-pass/if-bot.rs b/src/test/run-pass/if-bot.rs index 125ea295e65..768f3431832 100644 --- a/src/test/run-pass/if-bot.rs +++ b/src/test/run-pass/if-bot.rs @@ -11,6 +11,6 @@ pub fn main() { - let i: int = if false { fail!() } else { 5 }; - info!(i); + let i: int = if false { fail2!() } else { 5 }; + info2!("{:?}", i); } diff --git a/src/test/run-pass/if-check.rs b/src/test/run-pass/if-check.rs index 3fb45f82f57..0fd5fc01d17 100644 --- a/src/test/run-pass/if-check.rs +++ b/src/test/run-pass/if-check.rs @@ -16,9 +16,9 @@ fn even(x: uint) -> bool { fn foo(x: uint) { if even(x) { - info!(x); + info2!("{}", x); } else { - fail!(); + fail2!(); } } diff --git a/src/test/run-pass/import-glob-0.rs b/src/test/run-pass/import-glob-0.rs index 378bc25eaf6..f71bdb4e182 100644 --- a/src/test/run-pass/import-glob-0.rs +++ b/src/test/run-pass/import-glob-0.rs @@ -14,10 +14,10 @@ use module_of_many_things::*; use dug::too::greedily::and::too::deep::*; 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"); } } mod dug { @@ -26,8 +26,8 @@ mod dug { pub mod and { pub mod too { pub mod deep { - pub fn nameless_fear() { info!("Boo!"); } - pub fn also_redstone() { info!("Whatever."); } + pub fn nameless_fear() { info2!("Boo!"); } + pub fn also_redstone() { info2!("Whatever."); } } } } diff --git a/src/test/run-pass/import.rs b/src/test/run-pass/import.rs index dcbe038c65a..eff085e687d 100644 --- a/src/test/run-pass/import.rs +++ b/src/test/run-pass/import.rs @@ -11,7 +11,7 @@ // except according to those terms. mod foo { - pub fn x(y: int) { info!(y); } + pub fn x(y: int) { info2!("{:?}", y); } } mod bar { diff --git a/src/test/run-pass/import2.rs b/src/test/run-pass/import2.rs index 9cda55f5084..3ca64ce199e 100644 --- a/src/test/run-pass/import2.rs +++ b/src/test/run-pass/import2.rs @@ -14,7 +14,7 @@ use zed::bar; mod zed { - pub fn bar() { info!("bar"); } + pub fn bar() { info2!("bar"); } } pub fn main() { bar(); } diff --git a/src/test/run-pass/import3.rs b/src/test/run-pass/import3.rs index 64d47bf2219..10f6d87bf4c 100644 --- a/src/test/run-pass/import3.rs +++ b/src/test/run-pass/import3.rs @@ -17,7 +17,7 @@ use baz::zed::bar; mod baz { pub mod zed { - pub fn bar() { info!("bar2"); } + pub fn bar() { info2!("bar2"); } } } diff --git a/src/test/run-pass/import4.rs b/src/test/run-pass/import4.rs index d368ab2e993..d453306317b 100644 --- a/src/test/run-pass/import4.rs +++ b/src/test/run-pass/import4.rs @@ -14,7 +14,7 @@ use zed::bar; mod zed { - pub fn bar() { info!("bar"); } + pub fn bar() { info2!("bar"); } } pub fn main() { let _zed = 42; bar(); } diff --git a/src/test/run-pass/import5.rs b/src/test/run-pass/import5.rs index e9539b290ae..00c5f35c542 100644 --- a/src/test/run-pass/import5.rs +++ b/src/test/run-pass/import5.rs @@ -14,7 +14,7 @@ use foo::bar; mod foo { pub use foo::zed::bar; pub mod zed { - pub fn bar() { info!("foo"); } + pub fn bar() { info2!("foo"); } } } diff --git a/src/test/run-pass/import6.rs b/src/test/run-pass/import6.rs index 4f813247576..150a89f6176 100644 --- a/src/test/run-pass/import6.rs +++ b/src/test/run-pass/import6.rs @@ -17,7 +17,7 @@ use bar::baz; mod foo { pub mod zed { - pub fn baz() { info!("baz"); } + pub fn baz() { info2!("baz"); } } } mod bar { diff --git a/src/test/run-pass/import7.rs b/src/test/run-pass/import7.rs index 63a30ccee2c..e9241882f65 100644 --- a/src/test/run-pass/import7.rs +++ b/src/test/run-pass/import7.rs @@ -17,7 +17,7 @@ use bar::baz; mod foo { pub mod zed { - pub fn baz() { info!("baz"); } + pub fn baz() { info2!("baz"); } } } mod bar { diff --git a/src/test/run-pass/import8.rs b/src/test/run-pass/import8.rs index 849522ab6e5..9b0c512d4f1 100644 --- a/src/test/run-pass/import8.rs +++ b/src/test/run-pass/import8.rs @@ -15,7 +15,7 @@ use foo::x; use z = foo::x; mod foo { - pub fn x(y: int) { info!(y); } + pub fn x(y: int) { info2!("{}", y); } } pub fn main() { x(10); z(10); } diff --git a/src/test/run-pass/inner-module.rs b/src/test/run-pass/inner-module.rs index 1e53dd849fc..7e3547ba7f3 100644 --- a/src/test/run-pass/inner-module.rs +++ b/src/test/run-pass/inner-module.rs @@ -14,7 +14,7 @@ // -*- rust -*- mod inner { pub mod inner2 { - pub fn hello() { info!("hello, modular world"); } + pub fn hello() { info2!("hello, modular world"); } } pub fn hello() { inner2::hello(); } } diff --git a/src/test/run-pass/integral-indexing.rs b/src/test/run-pass/integral-indexing.rs index 1915e8ac800..05032dda759 100644 --- a/src/test/run-pass/integral-indexing.rs +++ b/src/test/run-pass/integral-indexing.rs @@ -20,11 +20,11 @@ pub fn main() { assert_eq!(v[3i8], 3); assert_eq!(v[3u32], 3); assert_eq!(v[3i32], 3); - info!(v[3u8]); + info2!("{}", v[3u8]); assert_eq!(s[3u], 'd' as u8); assert_eq!(s[3u8], 'd' as u8); assert_eq!(s[3i8], 'd' as u8); assert_eq!(s[3u32], 'd' as u8); assert_eq!(s[3i32], 'd' as u8); - info!(s[3u8]); + info2!("{}", s[3u8]); } diff --git a/src/test/run-pass/issue-1516.rs b/src/test/run-pass/issue-1516.rs index 4b73d83595e..17444e65708 100644 --- a/src/test/run-pass/issue-1516.rs +++ b/src/test/run-pass/issue-1516.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - let early_error: &'static fn(&str) -> ! = |_msg| { fail!() }; + let early_error: &'static fn(&str) -> ! = |_msg| { fail2!() }; } diff --git a/src/test/run-pass/issue-1696.rs b/src/test/run-pass/issue-1696.rs index d8023d2e716..de62c57ab9f 100644 --- a/src/test/run-pass/issue-1696.rs +++ b/src/test/run-pass/issue-1696.rs @@ -15,5 +15,5 @@ use std::hashmap::HashMap; pub fn main() { let mut m = HashMap::new(); m.insert("foo".as_bytes().to_owned(), "bar".as_bytes().to_owned()); - error!(m); + error2!("{:?}", m); } diff --git a/src/test/run-pass/issue-2216.rs b/src/test/run-pass/issue-2216.rs index 0914c81c3ff..4ad7d9500f6 100644 --- a/src/test/run-pass/issue-2216.rs +++ b/src/test/run-pass/issue-2216.rs @@ -27,6 +27,6 @@ pub fn main() { break; } - error!("%?", x); + error2!("{:?}", x); assert_eq!(x, 42); } diff --git a/src/test/run-pass/issue-2311-2.rs b/src/test/run-pass/issue-2311-2.rs index b03bfb958af..cf8d3dc642c 100644 --- a/src/test/run-pass/issue-2311-2.rs +++ b/src/test/run-pass/issue-2311-2.rs @@ -15,7 +15,7 @@ struct foo { impl foo { pub fn bar>(&self, _c: C) -> B { - fail!(); + fail2!(); } } diff --git a/src/test/run-pass/issue-2312.rs b/src/test/run-pass/issue-2312.rs index 14b5efe904d..54a8730fa1b 100644 --- a/src/test/run-pass/issue-2312.rs +++ b/src/test/run-pass/issue-2312.rs @@ -15,7 +15,7 @@ trait clam { } struct foo(int); impl foo { - pub fn bar>(&self, _c: C) -> B { fail!(); } + pub fn bar>(&self, _c: C) -> B { fail2!(); } } pub fn main() { } diff --git a/src/test/run-pass/issue-2611-3.rs b/src/test/run-pass/issue-2611-3.rs index 3cc7296fa4a..5882edf1880 100644 --- a/src/test/run-pass/issue-2611-3.rs +++ b/src/test/run-pass/issue-2611-3.rs @@ -20,7 +20,8 @@ struct E { } impl A for E { - fn b(_x: F) -> F { fail!() } //~ ERROR in method `b`, type parameter 0 has 1 bound, but + fn b(_x: F) -> F { fail2!() } + //~^ ERROR in method `b`, type parameter 0 has 1 bound, but } pub fn main() {} diff --git a/src/test/run-pass/issue-2633.rs b/src/test/run-pass/issue-2633.rs index bde18d77b9a..e905c895c35 100644 --- a/src/test/run-pass/issue-2633.rs +++ b/src/test/run-pass/issue-2633.rs @@ -13,7 +13,7 @@ struct cat { } fn meow() { - error!("meow") + error2!("meow") } fn cat() -> cat { diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 19f0843efd8..617f98cdb5f 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -52,9 +52,9 @@ pub mod pipes { } mod rusti { - pub fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail!(); } - pub fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail!(); } - pub fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail!(); } + pub fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail2!(); } + pub fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail2!(); } + pub fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail2!(); } } // We should consider moving this to ::std::unsafe, although I @@ -88,7 +88,7 @@ pub mod pipes { // The receiver will eventually clean this up. unsafe { forget(p); } } - full => { fail!("duplicate send") } + full => { fail2!("duplicate send") } blocked => { // The receiver will eventually clean this up. @@ -130,7 +130,7 @@ pub mod pipes { } full => { // This is impossible - fail!("you dun goofed") + fail2!("you dun goofed") } terminated => { // I have to clean up, use drop_glue @@ -147,7 +147,7 @@ pub mod pipes { } blocked => { // this shouldn't happen. - fail!("terminating a blocked packet") + fail2!("terminating a blocked packet") } terminated | full => { // I have to clean up, use drop_glue @@ -232,7 +232,7 @@ pub mod pingpong { let _addr : *::pipes::send_packet = match &p { &ping(ref x) => { cast::transmute(x) } }; - fail!() + fail2!() } } @@ -241,7 +241,7 @@ pub mod pingpong { let _addr : *::pipes::send_packet = match &p { &pong(ref x) => { cast::transmute(x) } }; - fail!() + fail2!() } } @@ -265,7 +265,7 @@ pub mod pingpong { pub fn do_pong(c: pong) -> (ping, ()) { let packet = ::pipes::recv(c); if packet.is_none() { - fail!("sender closed the connection") + fail2!("sender closed the connection") } (pingpong::liberate_pong(packet.unwrap()), ()) } @@ -280,7 +280,7 @@ pub mod pingpong { pub fn do_ping(c: ping) -> (pong, ()) { let packet = ::pipes::recv(c); if packet.is_none() { - fail!("sender closed the connection") + fail2!("sender closed the connection") } (pingpong::liberate_ping(packet.unwrap()), ()) } @@ -295,16 +295,16 @@ pub mod pingpong { fn client(chan: pingpong::client::ping) { let chan = pingpong::client::do_ping(chan); - error!(~"Sent ping"); + error2!("Sent ping"); let (_chan, _data) = pingpong::client::do_pong(chan); - error!(~"Received pong"); + error2!("Received pong"); } fn server(chan: pingpong::server::ping) { let (chan, _data) = pingpong::server::do_ping(chan); - error!(~"Received ping"); + error2!("Received ping"); let _chan = pingpong::server::do_pong(chan); - error!(~"Sent pong"); + error2!("Sent pong"); } pub fn main() { diff --git a/src/test/run-pass/issue-2804-2.rs b/src/test/run-pass/issue-2804-2.rs index 917839a5401..8fad80ce238 100644 --- a/src/test/run-pass/issue-2804-2.rs +++ b/src/test/run-pass/issue-2804-2.rs @@ -16,7 +16,7 @@ use std::hashmap::HashMap; fn add_interfaces(managed_ip: ~str, device: HashMap<~str, int>) { - error!("%s, %?", managed_ip, device.get(&~"interfaces")); + error2!("{}, {:?}", managed_ip, device.get(&~"interfaces")); } pub fn main() {} diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index 37cf2658ebc..efcdbaa482c 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -28,7 +28,7 @@ fn lookup(table: ~json::Object, key: ~str, default: ~str) -> ~str (*s).clone() } option::Some(value) => { - error!("%s was expected to be a string but is a %?", key, value); + error2!("{} was expected to be a string but is a {:?}", key, value); default } option::None => { @@ -42,12 +42,12 @@ fn add_interface(_store: int, managed_ip: ~str, data: extra::json::Json) -> (~st match &data { &extra::json::Object(ref interface) => { let name = lookup((*interface).clone(), ~"ifDescr", ~""); - let label = fmt!("%s-%s", managed_ip, name); + let label = format!("{}-{}", managed_ip, name); (label, bool_value(false)) } _ => { - error!("Expected dict for %s interfaces but found %?", managed_ip, data); + error2!("Expected dict for {} interfaces but found {:?}", managed_ip, data); (~"gnos:missing-interface", bool_value(true)) } } @@ -65,7 +65,7 @@ fn add_interfaces(store: int, managed_ip: ~str, device: HashMap<~str, extra::jso } _ => { - error!("Expected list for %s interfaces but found %?", managed_ip, + error2!("Expected list for {} interfaces but found {:?}", managed_ip, device.get(&~"interfaces")); ~[] } diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs index 978099be119..f2a4692d396 100644 --- a/src/test/run-pass/issue-2904.rs +++ b/src/test/run-pass/issue-2904.rs @@ -55,8 +55,8 @@ fn square_from_char(c: char) -> square { '.' => { earth } ' ' => { empty } _ => { - error!("invalid square: %?", c); - fail!() + error2!("invalid square: {:?}", c); + fail2!() } } } diff --git a/src/test/run-pass/issue-2935.rs b/src/test/run-pass/issue-2935.rs index c1f4e1e49aa..fff89381dbe 100644 --- a/src/test/run-pass/issue-2935.rs +++ b/src/test/run-pass/issue-2935.rs @@ -29,6 +29,6 @@ pub fn main() { // x.f(); // y.f(); // (*z).f(); - error!("ok so far..."); + error2!("ok so far..."); z.f(); //segfault } diff --git a/src/test/run-pass/issue-3109.rs b/src/test/run-pass/issue-3109.rs index 6af1075544e..76cb182b0b6 100644 --- a/src/test/run-pass/issue-3109.rs +++ b/src/test/run-pass/issue-3109.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - error!(("hi there!", "you")); + error2!("{:?}", ("hi there!", "you")); } diff --git a/src/test/run-pass/issue-3556.rs b/src/test/run-pass/issue-3556.rs index 6709ef761a4..f058a5cbfd1 100644 --- a/src/test/run-pass/issue-3556.rs +++ b/src/test/run-pass/issue-3556.rs @@ -26,7 +26,8 @@ fn check_strs(actual: &str, expected: &str) -> bool { if actual != expected { - io::stderr().write_line(fmt!("Found %s, but expected %s", actual, expected)); + io::stderr().write_line(format!("Found {}, but expected {}", actual, + expected)); return false; } return true; @@ -39,6 +40,6 @@ pub fn main() let t = Text(@~"foo"); let u = Section(@~[~"alpha"], true, @~[t], @~"foo", @~"foo", @~"foo", @~"foo", @~"foo"); - let v = fmt!("%?", u); // this is the line that causes the seg fault + let v = format!("{:?}", u); // this is the line that causes the seg fault assert!(v.len() > 0); } diff --git a/src/test/run-pass/issue-3563-3.rs b/src/test/run-pass/issue-3563-3.rs index 9040d5b5fb5..55273f7029b 100644 --- a/src/test/run-pass/issue-3563-3.rs +++ b/src/test/run-pass/issue-3563-3.rs @@ -150,7 +150,7 @@ impl Canvas for AsciiArt { // this little helper. pub fn check_strs(actual: &str, expected: &str) -> bool { if actual != expected { - io::stderr().write_line(fmt!("Found:\n%s\nbut expected\n%s", actual, expected)); + io::stderr().write_line(format!("Found:\n{}\nbut expected\n{}", actual, expected)); return false; } return true; diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs index 49f70b28e9a..c0bd5aa2a68 100644 --- a/src/test/run-pass/issue-3609.rs +++ b/src/test/run-pass/issue-3609.rs @@ -18,7 +18,7 @@ fn foo(name: ~str, samples_chan: Chan) { |buffer| { for i in range(0u, buffer.len()) { - error!("%?: %f", i, buffer[i]) + error2!("{}: {}", i, buffer[i]) } }; samples_chan.send(GetSamples(name.clone(), callback)); diff --git a/src/test/run-pass/issue-3895.rs b/src/test/run-pass/issue-3895.rs index efe0cb8d491..ef9cab87541 100644 --- a/src/test/run-pass/issue-3895.rs +++ b/src/test/run-pass/issue-3895.rs @@ -13,6 +13,6 @@ pub fn main() { match BadChar { _ if true => BadChar, - BadChar | BadSyntax => fail!() , + BadChar | BadSyntax => fail2!() , }; } diff --git a/src/test/run-pass/issue-4016.rs b/src/test/run-pass/issue-4016.rs index c4178961d9e..98b6a9c5f44 100644 --- a/src/test/run-pass/issue-4016.rs +++ b/src/test/run-pass/issue-4016.rs @@ -20,7 +20,7 @@ fn exec() { let doc = json::from_str("").unwrap(); let mut decoder = json::Decoder(doc); let _v: T = Decodable::decode(&mut decoder); - fail!() + fail2!() } pub fn main() {} diff --git a/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs b/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs index dd3f54d97ec..ac4b665e8fc 100644 --- a/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs +++ b/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs @@ -34,7 +34,7 @@ impl Debuggable for Thing { fn print_name(x: &Debuggable) { - println(fmt!("debug_name = %s", x.debug_name())); + println!("debug_name = {}", x.debug_name()); } pub fn main() { diff --git a/src/test/run-pass/issue-5275.rs b/src/test/run-pass/issue-5275.rs index 8f0d01fab40..b0560b4e637 100644 --- a/src/test/run-pass/issue-5275.rs +++ b/src/test/run-pass/issue-5275.rs @@ -12,14 +12,14 @@ fn foo(self_: &A) -> int { if true { - fail!() + fail2!() } else { *bar(self_.bar) } } fn bar<'r>(_: &'r mut int) -> &'r int { - fail!() + fail2!() } struct A { diff --git a/src/test/run-pass/issue-5666.rs b/src/test/run-pass/issue-5666.rs index 1be5d079132..eeccac99c98 100644 --- a/src/test/run-pass/issue-5666.rs +++ b/src/test/run-pass/issue-5666.rs @@ -18,7 +18,7 @@ trait Barks { impl Barks for Dog { fn bark(&self) -> ~str { - return fmt!("woof! (I'm %s)", self.name); + return format!("woof! (I'm {})", self.name); } } @@ -29,7 +29,7 @@ pub fn main() { let barker = [snoopy as ~Barks, bubbles as ~Barks]; for pup in barker.iter() { - println(fmt!("%s", pup.bark())); + println!("{}", pup.bark()); } } diff --git a/src/test/run-pass/issue-5688.rs b/src/test/run-pass/issue-5688.rs index 4ac4b3b33b7..869374d6ad4 100644 --- a/src/test/run-pass/issue-5688.rs +++ b/src/test/run-pass/issue-5688.rs @@ -21,6 +21,6 @@ struct X { vec: &'static [int] } static V: &'static [X] = &[X { vec: &[1, 2, 3] }]; pub fn main() { for &v in V.iter() { - println(fmt!("%?", v.vec)); + println!("{:?}", v.vec); } } diff --git a/src/test/run-pass/issue-5708.rs b/src/test/run-pass/issue-5708.rs index aee1f8415ef..918e43d040c 100644 --- a/src/test/run-pass/issue-5708.rs +++ b/src/test/run-pass/issue-5708.rs @@ -24,7 +24,7 @@ trait Inner { } impl Inner for int { - fn print(&self) { print(fmt!("Inner: %d\n", *self)); } + fn print(&self) { print(format!("Inner: {}\n", *self)); } } struct Outer<'self> { diff --git a/src/test/run-pass/issue-5926.rs b/src/test/run-pass/issue-5926.rs index d941e632664..dbaa5460fd0 100644 --- a/src/test/run-pass/issue-5926.rs +++ b/src/test/run-pass/issue-5926.rs @@ -14,6 +14,6 @@ pub fn main() { let mut your_favorite_numbers = @[1,2,3]; let mut my_favorite_numbers = @[4,5,6]; let f = your_favorite_numbers + my_favorite_numbers; - println(fmt!("The third favorite number is %?.", f)) + println!("The third favorite number is {:?}.", f) } diff --git a/src/test/run-pass/issue-6128.rs b/src/test/run-pass/issue-6128.rs index a01a04ebf82..51c7ed8babc 100644 --- a/src/test/run-pass/issue-6128.rs +++ b/src/test/run-pass/issue-6128.rs @@ -17,7 +17,7 @@ trait Graph { impl Graph for HashMap { fn f(&self, _e: E) { - fail!(); + fail2!(); } } diff --git a/src/test/run-pass/issue-6344-let.rs b/src/test/run-pass/issue-6344-let.rs index 9343f2b61c9..2d70f2623e4 100644 --- a/src/test/run-pass/issue-6344-let.rs +++ b/src/test/run-pass/issue-6344-let.rs @@ -17,5 +17,5 @@ pub fn main() { let a = A { x: 0 }; let A { x: ref x } = a; - info!("%?", x) + info2!("{:?}", x) } diff --git a/src/test/run-pass/issue-6344-match.rs b/src/test/run-pass/issue-6344-match.rs index 18d327aa360..465e413b0ec 100644 --- a/src/test/run-pass/issue-6344-match.rs +++ b/src/test/run-pass/issue-6344-match.rs @@ -18,7 +18,7 @@ pub fn main() { match a { A { x : ref x } => { - info!("%?", x) + info2!("{:?}", x) } } } diff --git a/src/test/run-pass/issue-7012.rs b/src/test/run-pass/issue-7012.rs index 2a56f2ad8bc..696197a21af 100644 --- a/src/test/run-pass/issue-7012.rs +++ b/src/test/run-pass/issue-7012.rs @@ -23,5 +23,5 @@ static test1: signature<'static> = signature { pub fn main() { let test = &[0x243f6a88u32,0x85a308d3u32,0x13198a2eu32,0x03707344u32,0xa4093822u32,0x299f31d0u32]; - println(fmt!("%b",test==test1.pattern)); + println(format!("{}",test==test1.pattern)); } diff --git a/src/test/run-pass/issue-7563.rs b/src/test/run-pass/issue-7563.rs index f36dcb5ef1b..348a455830f 100644 --- a/src/test/run-pass/issue-7563.rs +++ b/src/test/run-pass/issue-7563.rs @@ -19,7 +19,7 @@ pub fn main() { let sa = A { a: 100 }; let sb = B { b: 200, pa: &sa }; - debug!("sa is %?", sa); - debug!("sb is %?", sb); - debug!("sb.pa is %?", sb.get_pa()); + debug2!("sa is {:?}", sa); + debug2!("sb is {:?}", sb); + debug2!("sb.pa is {:?}", sb.get_pa()); } diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index 5a54821dc1e..07731020d34 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -11,7 +11,7 @@ fn assert_repr_eq(obj : T, expected : ~str) { - assert_eq!(expected, fmt!("%?", obj)); + assert_eq!(expected, format!("{:?}", obj)); } pub fn main() { diff --git a/src/test/run-pass/istr.rs b/src/test/run-pass/istr.rs index 254954fbde9..a02edba5f65 100644 --- a/src/test/run-pass/istr.rs +++ b/src/test/run-pass/istr.rs @@ -10,7 +10,7 @@ fn test_stack_assign() { let s: ~str = ~"a"; - info!(s.clone()); + info2!("{}", s.clone()); let t: ~str = ~"a"; assert!(s == t); let u: ~str = ~"b"; @@ -27,7 +27,7 @@ fn test_heap_assign() { assert!((s != u)); } -fn test_heap_log() { let s = ~"a big ol' string"; info!(s); } +fn test_heap_log() { let s = ~"a big ol' string"; info2!("{}", s); } fn test_stack_add() { assert_eq!(~"a" + "b", ~"ab"); @@ -49,7 +49,7 @@ fn test_append() { let mut s = ~"a"; s.push_str("b"); - info!(s.clone()); + info2!("{}", s.clone()); assert_eq!(s, ~"ab"); let mut s = ~"c"; diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index 29c1c630660..e661fe7771a 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -151,7 +151,7 @@ mod test_distinguish_syntax_ext { extern mod extra; pub fn f() { - fmt!("test%s", "s"); + format!("test{}", "s"); #[attr = "val"] fn g() { } } diff --git a/src/test/run-pass/iter-range.rs b/src/test/run-pass/iter-range.rs index edb91a11cfc..82163200e59 100644 --- a/src/test/run-pass/iter-range.rs +++ b/src/test/run-pass/iter-range.rs @@ -19,5 +19,5 @@ fn range_(a: int, b: int, it: &fn(int)) { pub fn main() { let mut sum: int = 0; range_(0, 100, |x| sum += x ); - info!(sum); + info2!("{}", sum); } diff --git a/src/test/run-pass/lambda-infer-unresolved.rs b/src/test/run-pass/lambda-infer-unresolved.rs index d55150e448e..0a6393d3dee 100644 --- a/src/test/run-pass/lambda-infer-unresolved.rs +++ b/src/test/run-pass/lambda-infer-unresolved.rs @@ -16,6 +16,6 @@ struct Refs { refs: ~[int], n: int } pub fn main() { let e = @mut Refs{refs: ~[], n: 0}; - let _f: &fn() = || error!(e.n); + let _f: &fn() = || error2!("{}", e.n); e.refs.push(1); } diff --git a/src/test/run-pass/last-use-in-block.rs b/src/test/run-pass/last-use-in-block.rs index e2dbf7d29db..2f7f0f26e0f 100644 --- a/src/test/run-pass/last-use-in-block.rs +++ b/src/test/run-pass/last-use-in-block.rs @@ -15,7 +15,7 @@ fn lp(s: ~str, f: &fn(~str) -> T) -> T { let r = f(s); return (r); } - fail!(); + fail2!(); } fn apply(s: ~str, f: &fn(~str) -> T) -> T { diff --git a/src/test/run-pass/last-use-is-capture.rs b/src/test/run-pass/last-use-is-capture.rs index 079d2374a29..a6beed631da 100644 --- a/src/test/run-pass/last-use-is-capture.rs +++ b/src/test/run-pass/last-use-is-capture.rs @@ -16,5 +16,5 @@ pub fn main() { fn invoke(f: &fn()) { f(); } let k = ~22; let _u = A {a: k.clone()}; - invoke(|| error!(k.clone()) ) + invoke(|| error2!("{:?}", k.clone()) ) } diff --git a/src/test/run-pass/lazy-and-or.rs b/src/test/run-pass/lazy-and-or.rs index 6dc1063aed8..c821f582662 100644 --- a/src/test/run-pass/lazy-and-or.rs +++ b/src/test/run-pass/lazy-and-or.rs @@ -16,7 +16,7 @@ pub fn main() { let x = 1 == 2 || 3 == 3; assert!((x)); let mut y: int = 10; - info!(x || incr(&mut y)); + info2!("{:?}", x || incr(&mut y)); assert_eq!(y, 10); if true && x { assert!((true)); } else { assert!((false)); } } diff --git a/src/test/run-pass/lazy-init.rs b/src/test/run-pass/lazy-init.rs index 33cccacaf90..53edb3d732c 100644 --- a/src/test/run-pass/lazy-init.rs +++ b/src/test/run-pass/lazy-init.rs @@ -10,6 +10,6 @@ -fn foo(x: int) { info!(x); } +fn foo(x: int) { info2!("{}", x); } pub fn main() { let mut x: int; if 1 > 2 { x = 12; } else { x = 10; } foo(x); } diff --git a/src/test/run-pass/linear-for-loop.rs b/src/test/run-pass/linear-for-loop.rs index 01ee4e20638..db27a471ba3 100644 --- a/src/test/run-pass/linear-for-loop.rs +++ b/src/test/run-pass/linear-for-loop.rs @@ -11,8 +11,8 @@ pub fn main() { let x = ~[1, 2, 3]; let mut y = 0; - for i in x.iter() { info!(*i); y += *i; } - info!(y); + for i in x.iter() { info2!("{:?}", *i); y += *i; } + info2!("{:?}", y); assert_eq!(y, 6); let s = ~"hello there"; let mut i: int = 0; @@ -25,8 +25,8 @@ pub fn main() { // ... i += 1; - info!(i); - info!(c); + info2!("{:?}", i); + info2!("{:?}", c); } assert_eq!(i, 11); } diff --git a/src/test/run-pass/liveness-loop-break.rs b/src/test/run-pass/liveness-loop-break.rs index b539429b079..103a34492d9 100644 --- a/src/test/run-pass/liveness-loop-break.rs +++ b/src/test/run-pass/liveness-loop-break.rs @@ -14,7 +14,7 @@ fn test() { v = 3; break; } - info!("%d", v); + info2!("{}", v); } pub fn main() { diff --git a/src/test/run-pass/log-err-phi.rs b/src/test/run-pass/log-err-phi.rs index 586a1377177..399ef25b727 100644 --- a/src/test/run-pass/log-err-phi.rs +++ b/src/test/run-pass/log-err-phi.rs @@ -10,4 +10,4 @@ -pub fn main() { if false { error!(~"foo" + "bar"); } } +pub fn main() { if false { error2!("{}", ~"foo" + "bar"); } } diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs index ec048d13a18..77bac4d12fc 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs @@ -20,13 +20,13 @@ enum foo { } fn check_log(exp: ~str, v: T) { - assert_eq!(exp, fmt!("%?", v)); + assert_eq!(exp, format!("{:?}", v)); } pub fn main() { let x = list::from_vec([a(22u), b(~"hi")]); let exp = ~"@Cons(a(22u), @Cons(b(~\"hi\"), @Nil))"; - let act = fmt!("%?", x); + let act = format!("{:?}", x); assert!(act == exp); check_log(exp, x); } diff --git a/src/test/run-pass/log-knows-the-names-of-variants.rs b/src/test/run-pass/log-knows-the-names-of-variants.rs index 4727e61b1fd..2e0b857f3cd 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants.rs @@ -19,8 +19,8 @@ enum bar { } pub fn main() { - assert_eq!(~"a(22u)", fmt!("%?", a(22u))); - assert_eq!(~"b(~\"hi\")", fmt!("%?", b(~"hi"))); - assert_eq!(~"c", fmt!("%?", c)); - assert_eq!(~"d", fmt!("%?", d)); + assert_eq!(~"a(22u)", format!("{:?}", a(22u))); + assert_eq!(~"b(~\"hi\")", format!("{:?}", b(~"hi"))); + assert_eq!(~"c", format!("{:?}", c)); + assert_eq!(~"d", format!("{:?}", d)); } diff --git a/src/test/run-pass/log-linearized.rs b/src/test/run-pass/log-linearized.rs index a67eb282a14..393b5c3d281 100644 --- a/src/test/run-pass/log-linearized.rs +++ b/src/test/run-pass/log-linearized.rs @@ -26,7 +26,7 @@ fn mk() -> @mut Smallintmap { fn f() { let sim = mk::(); - error!(sim); + error2!("{:?}", sim); } pub fn main() { diff --git a/src/test/run-pass/log-poly.rs b/src/test/run-pass/log-poly.rs index 08ff87df1b9..5cd45611377 100644 --- a/src/test/run-pass/log-poly.rs +++ b/src/test/run-pass/log-poly.rs @@ -13,8 +13,8 @@ enum Numbers { } pub fn main() { - info!(1); - info!(2.0); - warn!(Three); - error!(~[4]); + info2!("{}", 1); + info2!("{}", 2.0); + warn2!("{:?}", Three); + error2!("{:?}", ~[4]); } diff --git a/src/test/run-pass/log-str.rs b/src/test/run-pass/log-str.rs index fc48f4aea0c..a8914de917e 100644 --- a/src/test/run-pass/log-str.rs +++ b/src/test/run-pass/log-str.rs @@ -14,6 +14,6 @@ pub fn main() { let act = sys::log_str(&~[1, 2, 3]); assert_eq!(~"~[1, 2, 3]", act); - let act = fmt!("%?/%6?", ~[1, 2, 3], ~"hi"); - assert_eq!(act, ~"~[1, 2, 3]/ ~\"hi\""); + let act = format!("{:?}/{:6?}", ~[1, 2, 3], ~"hi"); + assert_eq!(act, ~"~[1, 2, 3]/~\"hi\" "); } diff --git a/src/test/run-pass/loop-break-cont.rs b/src/test/run-pass/loop-break-cont.rs index 64d2b3d0b21..396946ce5a0 100644 --- a/src/test/run-pass/loop-break-cont.rs +++ b/src/test/run-pass/loop-break-cont.rs @@ -11,7 +11,7 @@ pub fn main() { let mut i = 0u; loop { - error!(~"a"); + error2!("a"); i += 1u; if i == 10u { break; @@ -23,7 +23,7 @@ pub fn main() { if i == 21u { break; } - error!(~"b"); + error2!("b"); is_even = false; i += 1u; if i % 2u != 0u { @@ -33,7 +33,7 @@ pub fn main() { } assert!(!is_even); loop { - error!(~"c"); + error2!("c"); if i == 22u { break; } diff --git a/src/test/run-pass/macro-interpolation.rs b/src/test/run-pass/macro-interpolation.rs index 45c8669eae2..1c6ba82c3c9 100644 --- a/src/test/run-pass/macro-interpolation.rs +++ b/src/test/run-pass/macro-interpolation.rs @@ -17,7 +17,7 @@ macro_rules! overly_complicated ( Some($pat) => { $res } - _ => { fail!(); } + _ => { fail2!(); } } }) diff --git a/src/test/run-pass/match-borrowed_str.rs b/src/test/run-pass/match-borrowed_str.rs index a33c38d2428..acff2de548e 100644 --- a/src/test/run-pass/match-borrowed_str.rs +++ b/src/test/run-pass/match-borrowed_str.rs @@ -22,7 +22,7 @@ fn f2(ref_string: &str) -> ~str { match ref_string { "a" => ~"found a", "b" => ~"found b", - s => fmt!("not found (%s)", s) + s => format!("not found ({})", s) } } @@ -38,7 +38,7 @@ fn g2(ref_1: &str, ref_2: &str) -> ~str { match (ref_1, ref_2) { ("a", "b") => ~"found a,b", ("b", "c") => ~"found b,c", - (s1, s2) => fmt!("not found (%s, %s)", s1, s2) + (s1, s2) => format!("not found ({}, {})", s1, s2) } } diff --git a/src/test/run-pass/match-bot-2.rs b/src/test/run-pass/match-bot-2.rs index ba897bd92c0..3abc4435edc 100644 --- a/src/test/run-pass/match-bot-2.rs +++ b/src/test/run-pass/match-bot-2.rs @@ -9,5 +9,5 @@ // except according to those terms. // n.b. This was only ever failing with optimization disabled. -fn a() -> int { match return 1 { 2 => 3, _ => fail!() } } +fn a() -> int { match return 1 { 2 => 3, _ => fail2!() } } pub fn main() { a(); } diff --git a/src/test/run-pass/match-bot.rs b/src/test/run-pass/match-bot.rs index 29087be8af6..fd26dbfac0f 100644 --- a/src/test/run-pass/match-bot.rs +++ b/src/test/run-pass/match-bot.rs @@ -11,6 +11,6 @@ pub fn main() { let i: int = - match Some::(3) { None:: => { fail!() } Some::(_) => { 5 } }; - info!("%?", i); + match Some::(3) { None:: => { fail2!() } Some::(_) => { 5 } }; + info2!("{}", i); } diff --git a/src/test/run-pass/match-enum-struct-0.rs b/src/test/run-pass/match-enum-struct-0.rs index 365729ec860..3a223dc7016 100644 --- a/src/test/run-pass/match-enum-struct-0.rs +++ b/src/test/run-pass/match-enum-struct-0.rs @@ -18,7 +18,7 @@ enum E { pub fn main() { let e = Bar; match e { - Foo{f: _f} => fail!(), + Foo{f: _f} => fail2!(), _ => (), } } diff --git a/src/test/run-pass/match-enum-struct-1.rs b/src/test/run-pass/match-enum-struct-1.rs index 15d24c41a3d..65352ada394 100644 --- a/src/test/run-pass/match-enum-struct-1.rs +++ b/src/test/run-pass/match-enum-struct-1.rs @@ -17,10 +17,10 @@ pub fn main() { let e = Foo{f: 1}; match e { Foo{_} => (), - _ => fail!(), + _ => fail2!(), } match e { Foo{f: _f} => (), - _ => fail!(), + _ => fail2!(), } } diff --git a/src/test/run-pass/match-join.rs b/src/test/run-pass/match-join.rs index 0f01985f274..e73319712af 100644 --- a/src/test/run-pass/match-join.rs +++ b/src/test/run-pass/match-join.rs @@ -28,4 +28,4 @@ fn foo(y: Option) { return; } -pub fn main() { info!("hello"); foo::(Some::(5)); } +pub fn main() { info2!("hello"); foo::(Some::(5)); } diff --git a/src/test/run-pass/match-pattern-drop.rs b/src/test/run-pass/match-pattern-drop.rs index b8fa09ca63f..26aedf55705 100644 --- a/src/test/run-pass/match-pattern-drop.rs +++ b/src/test/run-pass/match-pattern-drop.rs @@ -14,20 +14,20 @@ enum t { make_t(@int), clam, } fn foo(s: @int) { - info!(::std::sys::refcount(s)); + info2!("{:?}", ::std::sys::refcount(s)); let count = ::std::sys::refcount(s); let x: t = make_t(s); // ref up assert_eq!(::std::sys::refcount(s), count + 1u); - info!(::std::sys::refcount(s)); + info2!("{:?}", ::std::sys::refcount(s)); match x { make_t(y) => { - info!("%?", y); // ref up then down + info2!("{:?}", y); // ref up then down } - _ => { info!("?"); fail!(); } + _ => { info2!("?"); fail2!(); } } - info!(::std::sys::refcount(s)); + info2!("{:?}", ::std::sys::refcount(s)); assert_eq!(::std::sys::refcount(s), count + 1u); let _ = ::std::sys::refcount(s); // don't get bitten by last-use. } @@ -39,7 +39,7 @@ pub fn main() { foo(s); // ref up then down - info!("%u", ::std::sys::refcount(s)); + info2!("{}", ::std::sys::refcount(s)); let count2 = ::std::sys::refcount(s); assert_eq!(count, count2); } diff --git a/src/test/run-pass/match-pattern-lit.rs b/src/test/run-pass/match-pattern-lit.rs index 84e9012be4e..9493b8d960d 100644 --- a/src/test/run-pass/match-pattern-lit.rs +++ b/src/test/run-pass/match-pattern-lit.rs @@ -12,9 +12,9 @@ fn altlit(f: int) -> int { match f { - 10 => { info!("case 10"); return 20; } - 11 => { info!("case 11"); return 22; } - _ => fail!("the impossible happened") + 10 => { info2!("case 10"); return 20; } + 11 => { info2!("case 11"); return 22; } + _ => fail2!("the impossible happened") } } diff --git a/src/test/run-pass/match-pattern-no-type-params.rs b/src/test/run-pass/match-pattern-no-type-params.rs index 2076f46e8ab..6ef3f75fbbc 100644 --- a/src/test/run-pass/match-pattern-no-type-params.rs +++ b/src/test/run-pass/match-pattern-no-type-params.rs @@ -12,8 +12,8 @@ enum maybe { nothing, just(T), } fn foo(x: maybe) { match x { - nothing => { error!("A"); } - just(_a) => { error!("B"); } + nothing => { error2!("A"); } + just(_a) => { error2!("B"); } } } diff --git a/src/test/run-pass/match-pipe-binding.rs b/src/test/run-pass/match-pipe-binding.rs index 6df4c812361..70832548f82 100644 --- a/src/test/run-pass/match-pipe-binding.rs +++ b/src/test/run-pass/match-pipe-binding.rs @@ -15,7 +15,7 @@ fn test1() { assert_eq!(a, ~"a"); assert_eq!(b, ~"b"); }, - _ => fail!(), + _ => fail2!(), } } @@ -25,7 +25,7 @@ fn test2() { assert_eq!(a, 2); assert_eq!(b, 3); }, - _ => fail!(), + _ => fail2!(), } } @@ -35,7 +35,7 @@ fn test3() { assert_eq!(*a, 2); assert_eq!(*b, 3); }, - _ => fail!(), + _ => fail2!(), } } @@ -45,7 +45,7 @@ fn test4() { assert_eq!(a, 2); assert_eq!(b, 3); }, - _ => fail!(), + _ => fail2!(), } } @@ -55,7 +55,7 @@ fn test5() { assert_eq!(*a, 2); assert_eq!(*b, 3); }, - _ => fail!(), + _ => fail2!(), } } diff --git a/src/test/run-pass/match-range.rs b/src/test/run-pass/match-range.rs index 6b02b21a084..a95c4e5289b 100644 --- a/src/test/run-pass/match-range.rs +++ b/src/test/run-pass/match-range.rs @@ -11,31 +11,31 @@ pub fn main() { match 5u { 1u..5u => {} - _ => fail!("should match range"), + _ => fail2!("should match range"), } match 5u { - 6u..7u => fail!("shouldn't match range"), + 6u..7u => fail2!("shouldn't match range"), _ => {} } match 5u { - 1u => fail!("should match non-first range"), + 1u => fail2!("should match non-first range"), 2u..6u => {} - _ => fail!("math is broken") + _ => fail2!("math is broken") } match 'c' { 'a'..'z' => {} - _ => fail!("should suppport char ranges") + _ => fail2!("should suppport char ranges") } match -3 { -7..5 => {} - _ => fail!("should match signed range") + _ => fail2!("should match signed range") } match 3.0 { 1.0..5.0 => {} - _ => fail!("should match float range") + _ => fail2!("should match float range") } match -1.5 { -3.6..3.6 => {} - _ => fail!("should match negative float range") + _ => fail2!("should match negative float range") } } diff --git a/src/test/run-pass/match-ref-binding-in-guard-3256.rs b/src/test/run-pass/match-ref-binding-in-guard-3256.rs index e1d2f0e1c48..74a3f255362 100644 --- a/src/test/run-pass/match-ref-binding-in-guard-3256.rs +++ b/src/test/run-pass/match-ref-binding-in-guard-3256.rs @@ -17,7 +17,7 @@ pub fn main() { Some(ref z) if z.with(|b| *b) => { do z.with |b| { assert!(*b); } }, - _ => fail!() + _ => fail2!() } } } diff --git a/src/test/run-pass/match-str.rs b/src/test/run-pass/match-str.rs index 8bbcc507f18..ecec003519c 100644 --- a/src/test/run-pass/match-str.rs +++ b/src/test/run-pass/match-str.rs @@ -11,21 +11,21 @@ // Issue #53 pub fn main() { - match ~"test" { ~"not-test" => fail!(), ~"test" => (), _ => fail!() } + match ~"test" { ~"not-test" => fail2!(), ~"test" => (), _ => fail2!() } enum t { tag1(~str), tag2, } match tag1(~"test") { - tag2 => fail!(), - tag1(~"not-test") => fail!(), + tag2 => fail2!(), + tag1(~"not-test") => fail2!(), tag1(~"test") => (), - _ => fail!() + _ => fail2!() } - let x = match ~"a" { ~"a" => 1, ~"b" => 2, _ => fail!() }; + let x = match ~"a" { ~"a" => 1, ~"b" => 2, _ => fail2!() }; assert_eq!(x, 1); - match ~"a" { ~"a" => { } ~"b" => { }, _ => fail!() } + match ~"a" { ~"a" => { } ~"b" => { }, _ => fail2!() } } diff --git a/src/test/run-pass/match-struct-0.rs b/src/test/run-pass/match-struct-0.rs index 67e844c519e..215b05ac73f 100644 --- a/src/test/run-pass/match-struct-0.rs +++ b/src/test/run-pass/match-struct-0.rs @@ -15,15 +15,15 @@ struct Foo{ pub fn main() { let f = Foo{f: 1}; match f { - Foo{f: 0} => fail!(), + Foo{f: 0} => fail2!(), Foo{_} => (), } match f { - Foo{f: 0} => fail!(), + Foo{f: 0} => fail2!(), Foo{f: _f} => (), } match f { - Foo{f: 0} => fail!(), + Foo{f: 0} => fail2!(), _ => (), } } diff --git a/src/test/run-pass/match-unique-bind.rs b/src/test/run-pass/match-unique-bind.rs index 9d62bc57ace..7f2af90d09a 100644 --- a/src/test/run-pass/match-unique-bind.rs +++ b/src/test/run-pass/match-unique-bind.rs @@ -11,7 +11,7 @@ pub fn main() { match ~100 { ~x => { - info!("%?", x); + info2!("{:?}", x); assert_eq!(x, 100); } } diff --git a/src/test/run-pass/match-with-ret-arm.rs b/src/test/run-pass/match-with-ret-arm.rs index 1d9d8fa219f..2476d440a15 100644 --- a/src/test/run-pass/match-with-ret-arm.rs +++ b/src/test/run-pass/match-with-ret-arm.rs @@ -19,5 +19,5 @@ pub fn main() { Some(num) => num as u32 }; assert_eq!(f, 1234u32); - error!(f) + error2!("{}", f) } diff --git a/src/test/run-pass/morestack-address.rs b/src/test/run-pass/morestack-address.rs index ef6bb4e93b2..cb4b078b9de 100644 --- a/src/test/run-pass/morestack-address.rs +++ b/src/test/run-pass/morestack-address.rs @@ -20,6 +20,6 @@ pub fn main() { unsafe { let addr = rusti::morestack_addr(); assert!(addr.is_not_null()); - error!("%?", addr); + error2!("{}", addr); } } diff --git a/src/test/run-pass/mutable-alias-vec.rs b/src/test/run-pass/mutable-alias-vec.rs index d8ea95be658..9ec91d930c0 100644 --- a/src/test/run-pass/mutable-alias-vec.rs +++ b/src/test/run-pass/mutable-alias-vec.rs @@ -21,6 +21,6 @@ pub fn main() { grow(&mut v); grow(&mut v); let len = v.len(); - info!(len); + info2!("{}", len); assert_eq!(len, 3 as uint); } diff --git a/src/test/run-pass/negative.rs b/src/test/run-pass/negative.rs index d92496c4b7b..a435f2c6050 100644 --- a/src/test/run-pass/negative.rs +++ b/src/test/run-pass/negative.rs @@ -11,6 +11,6 @@ pub fn main() { match -5 { -5 => {} - _ => { fail!() } + _ => { fail2!() } } } diff --git a/src/test/run-pass/nested-matchs.rs b/src/test/run-pass/nested-matchs.rs index cddbf60c382..9c728194e90 100644 --- a/src/test/run-pass/nested-matchs.rs +++ b/src/test/run-pass/nested-matchs.rs @@ -9,16 +9,16 @@ // except according to those terms. -fn baz() -> ! { fail!(); } +fn baz() -> ! { fail2!(); } fn foo() { match Some::(5) { Some::(_x) => { let mut bar; match None:: { None:: => { bar = 5; } _ => { baz(); } } - info!(bar); + info2!("{:?}", bar); } - None:: => { info!("hello"); } + None:: => { info2!("hello"); } } } diff --git a/src/test/run-pass/nested-pattern.rs b/src/test/run-pass/nested-pattern.rs index 0bc6280393c..cc8436e7c4b 100644 --- a/src/test/run-pass/nested-pattern.rs +++ b/src/test/run-pass/nested-pattern.rs @@ -16,8 +16,8 @@ enum t { foo(int, uint), bar(int, Option), } fn nested(o: t) { match o { - bar(_i, Some::(_)) => { error!("wrong pattern matched"); fail!(); } - _ => { error!("succeeded"); } + bar(_i, Some::(_)) => { error2!("wrong pattern matched"); fail2!(); } + _ => { error2!("succeeded"); } } } diff --git a/src/test/run-pass/nested-patterns.rs b/src/test/run-pass/nested-patterns.rs index d901a625e1d..b979518f8a1 100644 --- a/src/test/run-pass/nested-patterns.rs +++ b/src/test/run-pass/nested-patterns.rs @@ -16,7 +16,7 @@ struct C { c: int } pub fn main() { match A {a: 10, b: @20} { x@A {a, b: @20} => { assert!(x.a == 10); assert!(a == 10); } - A {b: _b, _} => { fail!(); } + A {b: _b, _} => { fail2!(); } } let mut x@B {b, _} = B {a: 10, b: C {c: 20}}; x.b.c = 30; diff --git a/src/test/run-pass/new-impl-syntax.rs b/src/test/run-pass/new-impl-syntax.rs index 71c13ecb9a3..bc2c147b242 100644 --- a/src/test/run-pass/new-impl-syntax.rs +++ b/src/test/run-pass/new-impl-syntax.rs @@ -5,7 +5,7 @@ struct Thingy { impl ToStr for Thingy { fn to_str(&self) -> ~str { - fmt!("{ x: %d, y: %d }", self.x, self.y) + format!("\\{ x: {}, y: {} \\}", self.x, self.y) } } diff --git a/src/test/run-pass/opeq.rs b/src/test/run-pass/opeq.rs index f384740f5f2..5172af17184 100644 --- a/src/test/run-pass/opeq.rs +++ b/src/test/run-pass/opeq.rs @@ -15,15 +15,15 @@ pub fn main() { let mut x: int = 1; x *= 2; - info!(x); + info2!("{}", x); assert_eq!(x, 2); x += 3; - info!(x); + info2!("{}", x); assert_eq!(x, 5); x *= x; - info!(x); + info2!("{}", x); assert_eq!(x, 25); x /= 5; - info!(x); + info2!("{}", x); assert_eq!(x, 5); } diff --git a/src/test/run-pass/option-unwrap.rs b/src/test/run-pass/option-unwrap.rs index 66cd7f2b55f..7c8872fae8a 100644 --- a/src/test/run-pass/option-unwrap.rs +++ b/src/test/run-pass/option-unwrap.rs @@ -24,7 +24,7 @@ impl Drop for dtor { fn unwrap(o: Option) -> T { match o { Some(v) => v, - None => fail!() + None => fail2!() } } diff --git a/src/test/run-pass/over-constrained-vregs.rs b/src/test/run-pass/over-constrained-vregs.rs index a41b7911523..0fc56cecec5 100644 --- a/src/test/run-pass/over-constrained-vregs.rs +++ b/src/test/run-pass/over-constrained-vregs.rs @@ -17,6 +17,6 @@ pub fn main() { while b <= 32u { 0u << b; b <<= 1u; - info!(b); + info2!("{:?}", b); } } diff --git a/src/test/run-pass/overload-index-operator.rs b/src/test/run-pass/overload-index-operator.rs index 0f83a8e730e..8de802e1fc9 100644 --- a/src/test/run-pass/overload-index-operator.rs +++ b/src/test/run-pass/overload-index-operator.rs @@ -36,7 +36,7 @@ impl Index for AssociationList { return pair.value.clone(); } } - fail!("No value found for key: %?", index); + fail2!("No value found for key: {:?}", index); } } diff --git a/src/test/run-pass/paren-free.rs b/src/test/run-pass/paren-free.rs index 751ba78b282..29789f38a4b 100644 --- a/src/test/run-pass/paren-free.rs +++ b/src/test/run-pass/paren-free.rs @@ -11,5 +11,5 @@ pub fn main() { let x = true; if x { let mut i = 10; while i > 0 { i -= 1; } } - match x { true => { info!("right"); } false => { info!("wrong"); } } + match x { true => { info2!("right"); } false => { info2!("wrong"); } } } diff --git a/src/test/run-pass/parse-fail.rs b/src/test/run-pass/parse-fail.rs index cd5d089c361..7d4a74fe32c 100644 --- a/src/test/run-pass/parse-fail.rs +++ b/src/test/run-pass/parse-fail.rs @@ -11,6 +11,6 @@ #[allow(unreachable_code)]; // -*- rust -*- -fn dont_call_me() { fail!(); info!(1); } +fn dont_call_me() { fail2!(); info2!("{}", 1); } pub fn main() { } diff --git a/src/test/run-pass/pass-by-copy.rs b/src/test/run-pass/pass-by-copy.rs index 716725899ab..a9cfd3aa183 100644 --- a/src/test/run-pass/pass-by-copy.rs +++ b/src/test/run-pass/pass-by-copy.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn magic(x: A) { info!(x); } -fn magic2(x: @int) { info!(x); } +fn magic(x: A) { info2!("{:?}", x); } +fn magic2(x: @int) { info2!("{:?}", x); } struct A { a: @int } diff --git a/src/test/run-pass/pure-fmt.rs b/src/test/run-pass/pure-fmt.rs index c16b10da5de..f5dc7c1c1d3 100644 --- a/src/test/run-pass/pure-fmt.rs +++ b/src/test/run-pass/pure-fmt.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Testing that calling fmt! (via info!) doesn't complain about impure borrows +// Testing that calling fmt! (via info2!) doesn't complain about impure borrows struct Big { b: @~str, c: uint, d: int, e: char, f: float, g: bool } @@ -22,12 +22,12 @@ fn foo() { f: 0.0, g: true }; - info!("test %?", a.b); - info!("test %u", a.c); - info!("test %i", a.d); - info!("test %c", a.e); - info!("test %f", a.f); - info!("test %b", a.g); + info2!("test {:?}", a.b); + info2!("test {:u}", a.c); + info2!("test {:i}", a.d); + info2!("test {:c}", a.e); + info2!("test {:f}", a.f); + info2!("test {:b}", a.g); } pub fn main() { diff --git a/src/test/run-pass/purity-infer.rs b/src/test/run-pass/purity-infer.rs index debde77b211..030df6bcc08 100644 --- a/src/test/run-pass/purity-infer.rs +++ b/src/test/run-pass/purity-infer.rs @@ -11,5 +11,5 @@ fn something(f: &fn()) { f(); } pub fn main() { - something(|| error!("hi!") ); + something(|| error2!("hi!") ); } diff --git a/src/test/run-pass/rcvr-borrowed-to-region.rs b/src/test/run-pass/rcvr-borrowed-to-region.rs index 46819027dad..376a14924c0 100644 --- a/src/test/run-pass/rcvr-borrowed-to-region.rs +++ b/src/test/run-pass/rcvr-borrowed-to-region.rs @@ -28,16 +28,16 @@ pub fn main() { let x = @6; let y = x.get(); - info!("y=%d", y); + info2!("y={}", y); assert_eq!(y, 6); let x = ~6; let y = x.get(); - info!("y=%d", y); + info2!("y={}", y); assert_eq!(y, 6); let x = &6; let y = x.get(); - info!("y=%d", y); + info2!("y={}", y); assert_eq!(y, 6); } diff --git a/src/test/run-pass/rcvr-borrowed-to-slice.rs b/src/test/run-pass/rcvr-borrowed-to-slice.rs index 63fe744f253..1f1b9d3d1ee 100644 --- a/src/test/run-pass/rcvr-borrowed-to-slice.rs +++ b/src/test/run-pass/rcvr-borrowed-to-slice.rs @@ -24,16 +24,16 @@ fn call_sum(x: &[int]) -> int { x.sum_() } pub fn main() { let x = ~[1, 2, 3]; let y = call_sum(x); - info!("y==%d", y); + info2!("y=={}", y); assert_eq!(y, 6); let x = ~[1, 2, 3]; let y = x.sum_(); - info!("y==%d", y); + info2!("y=={}", y); assert_eq!(y, 6); let x = ~[1, 2, 3]; let y = x.sum_(); - info!("y==%d", y); + info2!("y=={}", y); assert_eq!(y, 6); } diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs index 6c4d9915d85..b7a2330cf84 100644 --- a/src/test/run-pass/rec-align-u32.rs +++ b/src/test/run-pass/rec-align-u32.rs @@ -53,11 +53,11 @@ pub fn main() { let x = Outer {c8: 22u8, t: Inner {c64: 44u32}}; // Send it through the shape code - let y = fmt!("%?", x); + let y = format!("{:?}", x); - info!("align inner = %?", rusti::min_align_of::()); - info!("size outer = %?", sys::size_of::()); - info!("y = %s", y); + info2!("align inner = {:?}", rusti::min_align_of::()); + info2!("size outer = {:?}", sys::size_of::()); + info2!("y = {}", y); // per clang/gcc the alignment of `inner` is 4 on x86. assert_eq!(rusti::min_align_of::(), m::align()); diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index c116353e9c9..f3bfb998dbb 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -75,11 +75,11 @@ pub fn main() { let x = Outer {c8: 22u8, t: Inner {c64: 44u64}}; // Send it through the shape code - let y = fmt!("%?", x); + let y = format!("{:?}", x); - info!("align inner = %?", rusti::min_align_of::()); - info!("size outer = %?", sys::size_of::()); - info!("y = %s", y); + info2!("align inner = {}", rusti::min_align_of::()); + info2!("size outer = {}", sys::size_of::()); + info2!("y = {}", y); // per clang/gcc the alignment of `Inner` is 4 on x86. assert_eq!(rusti::min_align_of::(), m::m::align()); diff --git a/src/test/run-pass/rec-auto.rs b/src/test/run-pass/rec-auto.rs index 01a31ebf333..086d03ae4e3 100644 --- a/src/test/run-pass/rec-auto.rs +++ b/src/test/run-pass/rec-auto.rs @@ -19,6 +19,6 @@ struct X { foo: ~str, bar: ~str } pub fn main() { let x = X {foo: ~"hello", bar: ~"world"}; - info!(x.foo.clone()); - info!(x.bar.clone()); + info2!("{}", x.foo.clone()); + info2!("{}", x.bar.clone()); } diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs index 919fd351161..be276478522 100644 --- a/src/test/run-pass/reflect-visit-data.rs +++ b/src/test/run-pass/reflect-visit-data.rs @@ -559,7 +559,7 @@ impl TyVisitor for my_visitor { _sz: uint, _align: uint) -> bool { true } fn visit_rec_field(&mut self, _i: uint, _name: &str, _mtbl: uint, inner: *TyDesc) -> bool { - error!("rec field!"); + error2!("rec field!"); self.visit_inner(inner) } fn visit_leave_rec(&mut self, _n_fields: uint, @@ -577,7 +577,7 @@ impl TyVisitor for my_visitor { fn visit_enter_tup(&mut self, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_tup_field(&mut self, _i: uint, inner: *TyDesc) -> bool { - error!("tup field!"); + error2!("tup field!"); self.visit_inner(inner) } fn visit_leave_tup(&mut self, _n_fields: uint, @@ -641,7 +641,7 @@ pub fn main() { vals: ~[]}); let mut v = ptr_visit_adaptor(Inner {inner: u}); let td = get_tydesc_for(r); - error!("tydesc sz: %u, align: %u", + error2!("tydesc sz: {}, align: {}", (*td).size, (*td).align); visit_tydesc(td, &mut v as &mut TyVisitor); diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs index 258afaa3f8d..7b14b36df7d 100644 --- a/src/test/run-pass/reflect-visit-type.rs +++ b/src/test/run-pass/reflect-visit-type.rs @@ -17,32 +17,32 @@ struct MyVisitor { impl TyVisitor for MyVisitor { fn visit_bot(&mut self) -> bool { self.types.push(~"bot"); - error!("visited bot type"); + error2!("visited bot type"); true } fn visit_nil(&mut self) -> bool { self.types.push(~"nil"); - error!("visited nil type"); + error2!("visited nil type"); true } fn visit_bool(&mut self) -> bool { self.types.push(~"bool"); - error!("visited bool type"); + error2!("visited bool type"); true } fn visit_int(&mut self) -> bool { self.types.push(~"int"); - error!("visited int type"); + error2!("visited int type"); true } fn visit_i8(&mut self) -> bool { self.types.push(~"i8"); - error!("visited i8 type"); + error2!("visited i8 type"); true } fn visit_i16(&mut self) -> bool { self.types.push(~"i16"); - error!("visited i16 type"); + error2!("visited i16 type"); true } fn visit_i32(&mut self) -> bool { true } diff --git a/src/test/run-pass/region-dependent-addr-of.rs b/src/test/run-pass/region-dependent-addr-of.rs index d8076f543ec..1d44d8defdc 100644 --- a/src/test/run-pass/region-dependent-addr-of.rs +++ b/src/test/run-pass/region-dependent-addr-of.rs @@ -57,21 +57,21 @@ fn get_v5<'v>(a: &'v A, _i: uint) -> &'v int { fn get_v6_a<'v>(a: &'v A, _i: uint) -> &'v int { match a.value.v6 { Some(ref v) => &v.f, - None => fail!() + None => fail2!() } } fn get_v6_b<'v>(a: &'v A, _i: uint) -> &'v int { match *a { A { value: B { v6: Some(ref v), _ } } => &v.f, - _ => fail!() + _ => fail2!() } } fn get_v6_c<'v>(a: &'v A, _i: uint) -> &'v int { match a { &A { value: B { v6: Some(ref v), _ } } => &v.f, - _ => fail!() + _ => fail2!() } } diff --git a/src/test/run-pass/region-return-interior-of-option.rs b/src/test/run-pass/region-return-interior-of-option.rs index aa4630717db..9258b149fd3 100644 --- a/src/test/run-pass/region-return-interior-of-option.rs +++ b/src/test/run-pass/region-return-interior-of-option.rs @@ -11,7 +11,7 @@ fn get<'r, T>(opt: &'r Option) -> &'r T { match *opt { Some(ref v) => v, - None => fail!("none") + None => fail2!("none") } } diff --git a/src/test/run-pass/regions-addr-of-ret.rs b/src/test/run-pass/regions-addr-of-ret.rs index 9e19618f332..08b1d249869 100644 --- a/src/test/run-pass/regions-addr-of-ret.rs +++ b/src/test/run-pass/regions-addr-of-ret.rs @@ -14,5 +14,5 @@ fn f<'a>(x : &'a int) -> &'a int { pub fn main() { let three = &3; - error!(fmt!("%d", *f(three))); + error2!("{}", *f(three)); } diff --git a/src/test/run-pass/regions-borrow-at.rs b/src/test/run-pass/regions-borrow-at.rs index 08a09c59fac..a504296a182 100644 --- a/src/test/run-pass/regions-borrow-at.rs +++ b/src/test/run-pass/regions-borrow-at.rs @@ -15,6 +15,6 @@ fn foo(x: &uint) -> uint { pub fn main() { let p = @22u; let r = foo(p); - info!("r=%u", r); + info2!("r={}", r); assert_eq!(r, 22u); } diff --git a/src/test/run-pass/regions-bot.rs b/src/test/run-pass/regions-bot.rs index dbc5bf6626a..5d8d5d6033a 100644 --- a/src/test/run-pass/regions-bot.rs +++ b/src/test/run-pass/regions-bot.rs @@ -10,7 +10,7 @@ // A very limited test of the "bottom" region -fn produce_static() -> &'static T { fail!(); } +fn produce_static() -> &'static T { fail2!(); } fn foo(_x: &T) -> &uint { produce_static() } diff --git a/src/test/run-pass/regions-self-impls.rs b/src/test/run-pass/regions-self-impls.rs index 2a2fbcfe61f..61d088851fd 100644 --- a/src/test/run-pass/regions-self-impls.rs +++ b/src/test/run-pass/regions-self-impls.rs @@ -22,6 +22,6 @@ impl<'self> get_chowder<'self> for Clam<'self> { pub fn main() { let clam = Clam { chowder: &3 }; - info!(*clam.get_chowder()); + info2!("{:?}", *clam.get_chowder()); clam.get_chowder(); } diff --git a/src/test/run-pass/regions-self-in-enums.rs b/src/test/run-pass/regions-self-in-enums.rs index c35ec383665..f0b7306990d 100644 --- a/src/test/run-pass/regions-self-in-enums.rs +++ b/src/test/run-pass/regions-self-in-enums.rs @@ -19,5 +19,5 @@ pub fn main() { match y { int_wrapper_ctor(zz) => { z = zz; } } - info!(*z); + info2!("{:?}", *z); } diff --git a/src/test/run-pass/regions-simple.rs b/src/test/run-pass/regions-simple.rs index 318c8a8670e..e57c2e9807e 100644 --- a/src/test/run-pass/regions-simple.rs +++ b/src/test/run-pass/regions-simple.rs @@ -12,5 +12,5 @@ pub fn main() { let mut x: int = 3; let y: &mut int = &mut x; *y = 5; - info!(*y); + info2!("{:?}", *y); } diff --git a/src/test/run-pass/regions-static-closure.rs b/src/test/run-pass/regions-static-closure.rs index a2eb459ce20..3cb6fea3e53 100644 --- a/src/test/run-pass/regions-static-closure.rs +++ b/src/test/run-pass/regions-static-closure.rs @@ -21,6 +21,6 @@ fn call_static_closure(cl: closure_box<'static>) { } pub fn main() { - let cl_box = box_it(|| info!("Hello, world!")); + let cl_box = box_it(|| info2!("Hello, world!")); call_static_closure(cl_box); } diff --git a/src/test/run-pass/repeated-vector-syntax.rs b/src/test/run-pass/repeated-vector-syntax.rs index 40ce248f286..6291e229b6c 100644 --- a/src/test/run-pass/repeated-vector-syntax.rs +++ b/src/test/run-pass/repeated-vector-syntax.rs @@ -17,6 +17,6 @@ pub fn main() { let x = [ @[true], ..512 ]; let y = [ 0, ..1 ]; - error!("%?", x); - error!("%?", y); + error2!("{:?}", x); + error2!("{:?}", y); } diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs index dd5450de62f..2e30044f318 100644 --- a/src/test/run-pass/resource-assign-is-not-copy.rs +++ b/src/test/run-pass/resource-assign-is-not-copy.rs @@ -32,7 +32,7 @@ pub fn main() { let a = r(i); let b = (a, 10); let (c, _d) = b; - info!(c); + info2!("{:?}", c); } assert_eq!(*i, 1); } diff --git a/src/test/run-pass/resource-cycle.rs b/src/test/run-pass/resource-cycle.rs index a5354fd01cd..e7384203310 100644 --- a/src/test/run-pass/resource-cycle.rs +++ b/src/test/run-pass/resource-cycle.rs @@ -19,7 +19,7 @@ struct r { impl Drop for r { fn drop(&mut self) { unsafe { - info!("r's dtor: self = %x, self.v = %x, self.v's value = %x", + info2!("r's dtor: self = {:x}, self.v = {:x}, self.v's value = {:x}", cast::transmute::<*mut r, uint>(self), cast::transmute::<**int, uint>(&(self.v)), cast::transmute::<*int, uint>(self.v)); @@ -54,11 +54,11 @@ pub fn main() { next: None, r: { let rs = r(i1p); - info!("r = %x", cast::transmute::<*r, uint>(&rs)); + info2!("r = {:x}", cast::transmute::<*r, uint>(&rs)); rs } }); - info!("x1 = %x, x1.r = %x", + info2!("x1 = {:x}, x1.r = {:x}", cast::transmute::<@mut t, uint>(x1), cast::transmute::<*r, uint>(&x1.r)); @@ -66,12 +66,12 @@ pub fn main() { next: None, r: { let rs = r(i2p); - info!("r2 = %x", cast::transmute::<*r, uint>(&rs)); + info2!("r2 = {:x}", cast::transmute::<*r, uint>(&rs)); rs } }); - info!("x2 = %x, x2.r = %x", + info2!("x2 = {:x}, x2.r = {:x}", cast::transmute::<@mut t, uint>(x2), cast::transmute::<*r, uint>(&(x2.r))); diff --git a/src/test/run-pass/resource-destruct.rs b/src/test/run-pass/resource-destruct.rs index d92cfb5b9a5..70adccbb9c9 100644 --- a/src/test/run-pass/resource-destruct.rs +++ b/src/test/run-pass/resource-destruct.rs @@ -15,7 +15,7 @@ struct shrinky_pointer { #[unsafe_destructor] impl Drop for shrinky_pointer { fn drop(&mut self) { - error!(~"Hello!"); **(self.i) -= 1; + error2!("Hello!"); **(self.i) -= 1; } } @@ -32,6 +32,6 @@ fn shrinky_pointer(i: @@mut int) -> shrinky_pointer { pub fn main() { let my_total = @@mut 10; { let pt = shrinky_pointer(my_total); assert!((pt.look_at() == 10)); } - error!("my_total = %d", **my_total); + error2!("my_total = {}", **my_total); assert_eq!(**my_total, 9); } diff --git a/src/test/run-pass/ret-bang.rs b/src/test/run-pass/ret-bang.rs index 881294c4f33..f56cf57e12e 100644 --- a/src/test/run-pass/ret-bang.rs +++ b/src/test/run-pass/ret-bang.rs @@ -12,7 +12,7 @@ // -*- rust -*- -fn my_err(s: ~str) -> ! { error!(s); fail!(); } +fn my_err(s: ~str) -> ! { error2!("{:?}", s); fail2!(); } fn okay(i: uint) -> int { if i == 3u { my_err(~"I don't like three"); } else { return 42; } diff --git a/src/test/run-pass/rt-start-main-thread.rs b/src/test/run-pass/rt-start-main-thread.rs index 47a723ce6e1..9a6dfb22106 100644 --- a/src/test/run-pass/rt-start-main-thread.rs +++ b/src/test/run-pass/rt-start-main-thread.rs @@ -13,9 +13,9 @@ #[start] fn start(argc: int, argv: **u8) -> int { do std::rt::start_on_main_thread(argc, argv) { - info!("running on main thread"); + info2!("running on main thread"); do spawn { - info!("running on another thread"); + info2!("running on another thread"); } } } diff --git a/src/test/run-pass/sendfn-generic-fn.rs b/src/test/run-pass/sendfn-generic-fn.rs index e192a38dfa3..b7d6a0f3915 100644 --- a/src/test/run-pass/sendfn-generic-fn.rs +++ b/src/test/run-pass/sendfn-generic-fn.rs @@ -26,12 +26,12 @@ fn make_generic_record(a: A, b: B) -> Pair { fn test05_start(f: &~fn(v: float, v: ~str) -> Pair) { let p = (*f)(22.22f, ~"Hi"); - info!(p.clone()); + info2!("{:?}", p.clone()); assert!(p.a == 22.22f); assert!(p.b == ~"Hi"); let q = (*f)(44.44f, ~"Ho"); - info!(q.clone()); + info2!("{:?}", q.clone()); assert!(q.a == 44.44f); assert!(q.b == ~"Ho"); } diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs index 2399aa5b035..6cc8b27834c 100644 --- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs +++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs @@ -20,7 +20,7 @@ fn test05_start(f: ~fn(int)) { fn test05() { let three = ~3; let fn_to_send: ~fn(int) = |n| { - error!(*three + n); // will copy x into the closure + error2!("{}", *three + n); // will copy x into the closure assert_eq!(*three, 3); }; let fn_to_send = Cell::new(fn_to_send); diff --git a/src/test/run-pass/shadow.rs b/src/test/run-pass/shadow.rs index 2d3b505dfa6..345c2aad0d3 100644 --- a/src/test/run-pass/shadow.rs +++ b/src/test/run-pass/shadow.rs @@ -17,7 +17,7 @@ fn foo(c: ~[int]) { match none:: { some::(_) => { for _i in c.iter() { - info!(a); + info2!("{:?}", a); let a = 17; b.push(a); } diff --git a/src/test/run-pass/shape_intrinsic_tag_then_rec.rs b/src/test/run-pass/shape_intrinsic_tag_then_rec.rs index 11489c33eea..a989ac68d71 100644 --- a/src/test/run-pass/shape_intrinsic_tag_then_rec.rs +++ b/src/test/run-pass/shape_intrinsic_tag_then_rec.rs @@ -57,6 +57,6 @@ pub fn main() { let p_: Path_ = Path_ { global: true, idents: ~[~"hi"], types: ~[t] }; let p: path = Spanned { data: p_, span: sp }; let x = X { sp: sp, path: p }; - error!(x.path.clone()); - error!(x.clone()); + error2!("{:?}", x.path.clone()); + error2!("{:?}", x.clone()); } diff --git a/src/test/run-pass/simple-infer.rs b/src/test/run-pass/simple-infer.rs index efdf7f2792c..0924655a767 100644 --- a/src/test/run-pass/simple-infer.rs +++ b/src/test/run-pass/simple-infer.rs @@ -10,4 +10,4 @@ -pub fn main() { let mut n; n = 1; info!(n); } +pub fn main() { let mut n; n = 1; info2!("{}", n); } diff --git a/src/test/run-pass/simple-match-generic-tag.rs b/src/test/run-pass/simple-match-generic-tag.rs index d8b7c99d000..1c080bb8146 100644 --- a/src/test/run-pass/simple-match-generic-tag.rs +++ b/src/test/run-pass/simple-match-generic-tag.rs @@ -14,5 +14,5 @@ enum opt { none, } pub fn main() { let x = none::; - match x { none:: => { info!("hello world"); } } + match x { none:: => { info2!("hello world"); } } } diff --git a/src/test/run-pass/size-and-align.rs b/src/test/run-pass/size-and-align.rs index 7c9fef93943..d34da045c02 100644 --- a/src/test/run-pass/size-and-align.rs +++ b/src/test/run-pass/size-and-align.rs @@ -16,8 +16,12 @@ enum clam { a(T, int), b, } fn uhoh(v: ~[clam]) { match v[1] { - a::(ref _t, ref u) => { info!("incorrect"); info!(u); fail!(); } - b:: => { info!("correct"); } + a::(ref _t, ref u) => { + info2!("incorrect"); + info2!("{:?}", u); + fail2!(); + } + b:: => { info2!("correct"); } } } diff --git a/src/test/run-pass/spawn-fn.rs b/src/test/run-pass/spawn-fn.rs index 1825f1bcca3..f95ddcad4d6 100644 --- a/src/test/run-pass/spawn-fn.rs +++ b/src/test/run-pass/spawn-fn.rs @@ -12,8 +12,8 @@ use std::task; fn x(s: ~str, n: int) { - info!(s); - info!(n); + info2!("{:?}", s); + info2!("{:?}", n); } pub fn main() { @@ -21,5 +21,5 @@ pub fn main() { task::spawn(|| x(~"hello from second spawned fn", 66) ); task::spawn(|| x(~"hello from third spawned fn", 67) ); let mut i: int = 30; - while i > 0 { i = i - 1; info!("parent sleeping"); task::deschedule(); } + while i > 0 { i = i - 1; info2!("parent sleeping"); task::deschedule(); } } diff --git a/src/test/run-pass/spawn.rs b/src/test/run-pass/spawn.rs index dff73aa7b8e..9273752d629 100644 --- a/src/test/run-pass/spawn.rs +++ b/src/test/run-pass/spawn.rs @@ -17,4 +17,4 @@ pub fn main() { task::spawn(|| child(10) ); } -fn child(i: int) { error!(i); assert!((i == 10)); } +fn child(i: int) { error2!("{}", i); assert!((i == 10)); } diff --git a/src/test/run-pass/spawn2.rs b/src/test/run-pass/spawn2.rs index 61ed7053456..31967b31c63 100644 --- a/src/test/run-pass/spawn2.rs +++ b/src/test/run-pass/spawn2.rs @@ -15,15 +15,15 @@ pub fn main() { task::spawn(|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); } fn child(args: (int, int, int, int, int, int, int, int, int)) { let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args; - error!(i1); - error!(i2); - error!(i3); - error!(i4); - error!(i5); - error!(i6); - error!(i7); - error!(i8); - error!(i9); + error2!("{}", i1); + error2!("{}", i2); + error2!("{}", i3); + error2!("{}", i4); + error2!("{}", i5); + error2!("{}", i6); + error2!("{}", i7); + error2!("{}", i8); + error2!("{}", i9); assert_eq!(i1, 10); assert_eq!(i2, 20); assert_eq!(i3, 30); diff --git a/src/test/run-pass/stat.rs b/src/test/run-pass/stat.rs index d0dde4ad3c4..676d8572464 100644 --- a/src/test/run-pass/stat.rs +++ b/src/test/run-pass/stat.rs @@ -23,7 +23,7 @@ pub fn main() { { match io::file_writer(&path, [io::Create, io::Truncate]) { - Err(ref e) => fail!(e.clone()), + Err(ref e) => fail2!("{}", e.clone()), Ok(f) => { for _ in range(0u, 1000) { f.write_u8(0); diff --git a/src/test/run-pass/str-append.rs b/src/test/run-pass/str-append.rs index 331701107a8..fe57c5dd4e5 100644 --- a/src/test/run-pass/str-append.rs +++ b/src/test/run-pass/str-append.rs @@ -16,7 +16,7 @@ extern mod extra; fn test1() { let mut s: ~str = ~"hello"; s.push_str("world"); - info!(s.clone()); + info2!("{}", s.clone()); assert_eq!(s[9], 'd' as u8); } @@ -26,8 +26,8 @@ fn test2() { let ff: ~str = ~"abc"; let a: ~str = ff + "ABC" + ff; let b: ~str = ~"ABC" + ff + "ABC"; - info!(a.clone()); - info!(b.clone()); + info2!("{}", a.clone()); + info2!("{}", b.clone()); assert_eq!(a, ~"abcABCabc"); assert_eq!(b, ~"ABCabcABC"); } diff --git a/src/test/run-pass/str-concat.rs b/src/test/run-pass/str-concat.rs index 89804a6e562..dc605c50bb0 100644 --- a/src/test/run-pass/str-concat.rs +++ b/src/test/run-pass/str-concat.rs @@ -16,6 +16,6 @@ pub fn main() { let a: ~str = ~"hello"; let b: ~str = ~"world"; let s: ~str = a + b; - info!(s.clone()); + info2!("{}", s.clone()); assert_eq!(s[9], 'd' as u8); } diff --git a/src/test/run-pass/str-idx.rs b/src/test/run-pass/str-idx.rs index 68dcc0b9822..ca80f71cca7 100644 --- a/src/test/run-pass/str-idx.rs +++ b/src/test/run-pass/str-idx.rs @@ -13,6 +13,6 @@ pub fn main() { let s = ~"hello"; let c: u8 = s[4]; - info!(c); + info2!("{:?}", c); assert_eq!(c, 0x6f as u8); } diff --git a/src/test/run-pass/string-self-append.rs b/src/test/run-pass/string-self-append.rs index b1b90468e94..f230bb38701 100644 --- a/src/test/run-pass/string-self-append.rs +++ b/src/test/run-pass/string-self-append.rs @@ -16,7 +16,7 @@ pub fn main() { let mut i = 20; let mut expected_len = 1u; while i > 0 { - error!(a.len()); + error2!("{}", a.len()); assert_eq!(a.len(), expected_len); a = a + a; // FIXME(#3387)---can't write a += a i -= 1; diff --git a/src/test/run-pass/struct-literal-dtor.rs b/src/test/run-pass/struct-literal-dtor.rs index f983830936a..a4238799d09 100644 --- a/src/test/run-pass/struct-literal-dtor.rs +++ b/src/test/run-pass/struct-literal-dtor.rs @@ -14,7 +14,7 @@ struct foo { impl Drop for foo { fn drop(&mut self) { - error!("%s", self.x); + error2!("{}", self.x); } } diff --git a/src/test/run-pass/struct-return.rs b/src/test/run-pass/struct-return.rs index a1f5a2392b1..1cdc8d3826c 100644 --- a/src/test/run-pass/struct-return.rs +++ b/src/test/run-pass/struct-return.rs @@ -31,10 +31,10 @@ fn test1() { c: 0xcccc_cccc_cccc_cccc_u64, d: 0xdddd_dddd_dddd_dddd_u64 }; let qq = rustrt::rust_dbg_abi_1(q); - error!("a: %x", qq.a as uint); - error!("b: %x", qq.b as uint); - error!("c: %x", qq.c as uint); - error!("d: %x", qq.d as uint); + error2!("a: {:x}", qq.a as uint); + error2!("b: {:x}", qq.b as uint); + error2!("c: {:x}", qq.c as uint); + error2!("d: {:x}", qq.d as uint); assert_eq!(qq.a, q.c + 1u64); assert_eq!(qq.b, q.d - 1u64); assert_eq!(qq.c, q.a + 1u64); @@ -51,9 +51,9 @@ fn test2() { b: 0b_1010_1010_u8, c: 1.0987654321e-15_f64 }; let ff = rustrt::rust_dbg_abi_2(f); - error!("a: %f", ff.a as float); - error!("b: %u", ff.b as uint); - error!("c: %f", ff.c as float); + error2!("a: {}", ff.a as float); + error2!("b: {}", ff.b as uint); + error2!("c: {}", ff.c as float); assert_eq!(ff.a, f.c + 1.0f64); assert_eq!(ff.b, 0xff_u8); assert_eq!(ff.c, f.a - 1.0f64); diff --git a/src/test/run-pass/supported-cast.rs b/src/test/run-pass/supported-cast.rs index 663f36ce673..cfa721a4ed3 100644 --- a/src/test/run-pass/supported-cast.rs +++ b/src/test/run-pass/supported-cast.rs @@ -12,236 +12,236 @@ use std::libc; pub fn main() { let f = 1 as *libc::FILE; - info!(f as int); - info!(f as uint); - info!(f as i8); - info!(f as i16); - info!(f as i32); - info!(f as i64); - info!(f as u8); - info!(f as u16); - info!(f as u32); - info!(f as u64); + info2!("{}", f as int); + info2!("{}", f as uint); + info2!("{}", f as i8); + info2!("{}", f as i16); + info2!("{}", f as i32); + info2!("{}", f as i64); + info2!("{}", f as u8); + info2!("{}", f as u16); + info2!("{}", f as u32); + info2!("{}", f as u64); - info!(1 as int); - info!(1 as uint); - info!(1 as float); - info!(1 as *libc::FILE); - info!(1 as i8); - info!(1 as i16); - info!(1 as i32); - info!(1 as i64); - info!(1 as u8); - info!(1 as u16); - info!(1 as u32); - info!(1 as u64); - info!(1 as f32); - info!(1 as f64); + info2!("{}", 1 as int); + info2!("{}", 1 as uint); + info2!("{}", 1 as float); + info2!("{}", 1 as *libc::FILE); + info2!("{}", 1 as i8); + info2!("{}", 1 as i16); + info2!("{}", 1 as i32); + info2!("{}", 1 as i64); + info2!("{}", 1 as u8); + info2!("{}", 1 as u16); + info2!("{}", 1 as u32); + info2!("{}", 1 as u64); + info2!("{}", 1 as f32); + info2!("{}", 1 as f64); - info!(1u as int); - info!(1u as uint); - info!(1u as float); - info!(1u as *libc::FILE); - info!(1u as i8); - info!(1u as i16); - info!(1u as i32); - info!(1u as i64); - info!(1u as u8); - info!(1u as u16); - info!(1u as u32); - info!(1u as u64); - info!(1u as f32); - info!(1u as f64); + info2!("{}", 1u as int); + info2!("{}", 1u as uint); + info2!("{}", 1u as float); + info2!("{}", 1u as *libc::FILE); + info2!("{}", 1u as i8); + info2!("{}", 1u as i16); + info2!("{}", 1u as i32); + info2!("{}", 1u as i64); + info2!("{}", 1u as u8); + info2!("{}", 1u as u16); + info2!("{}", 1u as u32); + info2!("{}", 1u as u64); + info2!("{}", 1u as f32); + info2!("{}", 1u as f64); - info!(1i8 as int); - info!(1i8 as uint); - info!(1i8 as float); - info!(1i8 as *libc::FILE); - info!(1i8 as i8); - info!(1i8 as i16); - info!(1i8 as i32); - info!(1i8 as i64); - info!(1i8 as u8); - info!(1i8 as u16); - info!(1i8 as u32); - info!(1i8 as u64); - info!(1i8 as f32); - info!(1i8 as f64); + info2!("{}", 1i8 as int); + info2!("{}", 1i8 as uint); + info2!("{}", 1i8 as float); + info2!("{}", 1i8 as *libc::FILE); + info2!("{}", 1i8 as i8); + info2!("{}", 1i8 as i16); + info2!("{}", 1i8 as i32); + info2!("{}", 1i8 as i64); + info2!("{}", 1i8 as u8); + info2!("{}", 1i8 as u16); + info2!("{}", 1i8 as u32); + info2!("{}", 1i8 as u64); + info2!("{}", 1i8 as f32); + info2!("{}", 1i8 as f64); - info!(1u8 as int); - info!(1u8 as uint); - info!(1u8 as float); - info!(1u8 as *libc::FILE); - info!(1u8 as i8); - info!(1u8 as i16); - info!(1u8 as i32); - info!(1u8 as i64); - info!(1u8 as u8); - info!(1u8 as u16); - info!(1u8 as u32); - info!(1u8 as u64); - info!(1u8 as f32); - info!(1u8 as f64); + info2!("{}", 1u8 as int); + info2!("{}", 1u8 as uint); + info2!("{}", 1u8 as float); + info2!("{}", 1u8 as *libc::FILE); + info2!("{}", 1u8 as i8); + info2!("{}", 1u8 as i16); + info2!("{}", 1u8 as i32); + info2!("{}", 1u8 as i64); + info2!("{}", 1u8 as u8); + info2!("{}", 1u8 as u16); + info2!("{}", 1u8 as u32); + info2!("{}", 1u8 as u64); + info2!("{}", 1u8 as f32); + info2!("{}", 1u8 as f64); - info!(1i16 as int); - info!(1i16 as uint); - info!(1i16 as float); - info!(1i16 as *libc::FILE); - info!(1i16 as i8); - info!(1i16 as i16); - info!(1i16 as i32); - info!(1i16 as i64); - info!(1i16 as u8); - info!(1i16 as u16); - info!(1i16 as u32); - info!(1i16 as u64); - info!(1i16 as f32); - info!(1i16 as f64); + info2!("{}", 1i16 as int); + info2!("{}", 1i16 as uint); + info2!("{}", 1i16 as float); + info2!("{}", 1i16 as *libc::FILE); + info2!("{}", 1i16 as i8); + info2!("{}", 1i16 as i16); + info2!("{}", 1i16 as i32); + info2!("{}", 1i16 as i64); + info2!("{}", 1i16 as u8); + info2!("{}", 1i16 as u16); + info2!("{}", 1i16 as u32); + info2!("{}", 1i16 as u64); + info2!("{}", 1i16 as f32); + info2!("{}", 1i16 as f64); - info!(1u16 as int); - info!(1u16 as uint); - info!(1u16 as float); - info!(1u16 as *libc::FILE); - info!(1u16 as i8); - info!(1u16 as i16); - info!(1u16 as i32); - info!(1u16 as i64); - info!(1u16 as u8); - info!(1u16 as u16); - info!(1u16 as u32); - info!(1u16 as u64); - info!(1u16 as f32); - info!(1u16 as f64); + info2!("{}", 1u16 as int); + info2!("{}", 1u16 as uint); + info2!("{}", 1u16 as float); + info2!("{}", 1u16 as *libc::FILE); + info2!("{}", 1u16 as i8); + info2!("{}", 1u16 as i16); + info2!("{}", 1u16 as i32); + info2!("{}", 1u16 as i64); + info2!("{}", 1u16 as u8); + info2!("{}", 1u16 as u16); + info2!("{}", 1u16 as u32); + info2!("{}", 1u16 as u64); + info2!("{}", 1u16 as f32); + info2!("{}", 1u16 as f64); - info!(1i32 as int); - info!(1i32 as uint); - info!(1i32 as float); - info!(1i32 as *libc::FILE); - info!(1i32 as i8); - info!(1i32 as i16); - info!(1i32 as i32); - info!(1i32 as i64); - info!(1i32 as u8); - info!(1i32 as u16); - info!(1i32 as u32); - info!(1i32 as u64); - info!(1i32 as f32); - info!(1i32 as f64); + info2!("{}", 1i32 as int); + info2!("{}", 1i32 as uint); + info2!("{}", 1i32 as float); + info2!("{}", 1i32 as *libc::FILE); + info2!("{}", 1i32 as i8); + info2!("{}", 1i32 as i16); + info2!("{}", 1i32 as i32); + info2!("{}", 1i32 as i64); + info2!("{}", 1i32 as u8); + info2!("{}", 1i32 as u16); + info2!("{}", 1i32 as u32); + info2!("{}", 1i32 as u64); + info2!("{}", 1i32 as f32); + info2!("{}", 1i32 as f64); - info!(1u32 as int); - info!(1u32 as uint); - info!(1u32 as float); - info!(1u32 as *libc::FILE); - info!(1u32 as i8); - info!(1u32 as i16); - info!(1u32 as i32); - info!(1u32 as i64); - info!(1u32 as u8); - info!(1u32 as u16); - info!(1u32 as u32); - info!(1u32 as u64); - info!(1u32 as f32); - info!(1u32 as f64); + info2!("{}", 1u32 as int); + info2!("{}", 1u32 as uint); + info2!("{}", 1u32 as float); + info2!("{}", 1u32 as *libc::FILE); + info2!("{}", 1u32 as i8); + info2!("{}", 1u32 as i16); + info2!("{}", 1u32 as i32); + info2!("{}", 1u32 as i64); + info2!("{}", 1u32 as u8); + info2!("{}", 1u32 as u16); + info2!("{}", 1u32 as u32); + info2!("{}", 1u32 as u64); + info2!("{}", 1u32 as f32); + info2!("{}", 1u32 as f64); - info!(1i64 as int); - info!(1i64 as uint); - info!(1i64 as float); - info!(1i64 as *libc::FILE); - info!(1i64 as i8); - info!(1i64 as i16); - info!(1i64 as i32); - info!(1i64 as i64); - info!(1i64 as u8); - info!(1i64 as u16); - info!(1i64 as u32); - info!(1i64 as u64); - info!(1i64 as f32); - info!(1i64 as f64); + info2!("{}", 1i64 as int); + info2!("{}", 1i64 as uint); + info2!("{}", 1i64 as float); + info2!("{}", 1i64 as *libc::FILE); + info2!("{}", 1i64 as i8); + info2!("{}", 1i64 as i16); + info2!("{}", 1i64 as i32); + info2!("{}", 1i64 as i64); + info2!("{}", 1i64 as u8); + info2!("{}", 1i64 as u16); + info2!("{}", 1i64 as u32); + info2!("{}", 1i64 as u64); + info2!("{}", 1i64 as f32); + info2!("{}", 1i64 as f64); - info!(1u64 as int); - info!(1u64 as uint); - info!(1u64 as float); - info!(1u64 as *libc::FILE); - info!(1u64 as i8); - info!(1u64 as i16); - info!(1u64 as i32); - info!(1u64 as i64); - info!(1u64 as u8); - info!(1u64 as u16); - info!(1u64 as u32); - info!(1u64 as u64); - info!(1u64 as f32); - info!(1u64 as f64); + info2!("{}", 1u64 as int); + info2!("{}", 1u64 as uint); + info2!("{}", 1u64 as float); + info2!("{}", 1u64 as *libc::FILE); + info2!("{}", 1u64 as i8); + info2!("{}", 1u64 as i16); + info2!("{}", 1u64 as i32); + info2!("{}", 1u64 as i64); + info2!("{}", 1u64 as u8); + info2!("{}", 1u64 as u16); + info2!("{}", 1u64 as u32); + info2!("{}", 1u64 as u64); + info2!("{}", 1u64 as f32); + info2!("{}", 1u64 as f64); - info!(1u64 as int); - info!(1u64 as uint); - info!(1u64 as float); - info!(1u64 as *libc::FILE); - info!(1u64 as i8); - info!(1u64 as i16); - info!(1u64 as i32); - info!(1u64 as i64); - info!(1u64 as u8); - info!(1u64 as u16); - info!(1u64 as u32); - info!(1u64 as u64); - info!(1u64 as f32); - info!(1u64 as f64); + info2!("{}", 1u64 as int); + info2!("{}", 1u64 as uint); + info2!("{}", 1u64 as float); + info2!("{}", 1u64 as *libc::FILE); + info2!("{}", 1u64 as i8); + info2!("{}", 1u64 as i16); + info2!("{}", 1u64 as i32); + info2!("{}", 1u64 as i64); + info2!("{}", 1u64 as u8); + info2!("{}", 1u64 as u16); + info2!("{}", 1u64 as u32); + info2!("{}", 1u64 as u64); + info2!("{}", 1u64 as f32); + info2!("{}", 1u64 as f64); - info!(true as int); - info!(true as uint); - info!(true as float); - info!(true as *libc::FILE); - info!(true as i8); - info!(true as i16); - info!(true as i32); - info!(true as i64); - info!(true as u8); - info!(true as u16); - info!(true as u32); - info!(true as u64); - info!(true as f32); - info!(true as f64); + info2!("{}", true as int); + info2!("{}", true as uint); + info2!("{}", true as float); + info2!("{}", true as *libc::FILE); + info2!("{}", true as i8); + info2!("{}", true as i16); + info2!("{}", true as i32); + info2!("{}", true as i64); + info2!("{}", true as u8); + info2!("{}", true as u16); + info2!("{}", true as u32); + info2!("{}", true as u64); + info2!("{}", true as f32); + info2!("{}", true as f64); - info!(1. as int); - info!(1. as uint); - info!(1. as float); - info!(1. as i8); - info!(1. as i16); - info!(1. as i32); - info!(1. as i64); - info!(1. as u8); - info!(1. as u16); - info!(1. as u32); - info!(1. as u64); - info!(1. as f32); - info!(1. as f64); + info2!("{}", 1. as int); + info2!("{}", 1. as uint); + info2!("{}", 1. as float); + info2!("{}", 1. as i8); + info2!("{}", 1. as i16); + info2!("{}", 1. as i32); + info2!("{}", 1. as i64); + info2!("{}", 1. as u8); + info2!("{}", 1. as u16); + info2!("{}", 1. as u32); + info2!("{}", 1. as u64); + info2!("{}", 1. as f32); + info2!("{}", 1. as f64); - info!(1f32 as int); - info!(1f32 as uint); - info!(1f32 as float); - info!(1f32 as i8); - info!(1f32 as i16); - info!(1f32 as i32); - info!(1f32 as i64); - info!(1f32 as u8); - info!(1f32 as u16); - info!(1f32 as u32); - info!(1f32 as u64); - info!(1f32 as f32); - info!(1f32 as f64); + info2!("{}", 1f32 as int); + info2!("{}", 1f32 as uint); + info2!("{}", 1f32 as float); + info2!("{}", 1f32 as i8); + info2!("{}", 1f32 as i16); + info2!("{}", 1f32 as i32); + info2!("{}", 1f32 as i64); + info2!("{}", 1f32 as u8); + info2!("{}", 1f32 as u16); + info2!("{}", 1f32 as u32); + info2!("{}", 1f32 as u64); + info2!("{}", 1f32 as f32); + info2!("{}", 1f32 as f64); - info!(1f64 as int); - info!(1f64 as uint); - info!(1f64 as float); - info!(1f64 as i8); - info!(1f64 as i16); - info!(1f64 as i32); - info!(1f64 as i64); - info!(1f64 as u8); - info!(1f64 as u16); - info!(1f64 as u32); - info!(1f64 as u64); - info!(1f64 as f32); - info!(1f64 as f64); + info2!("{}", 1f64 as int); + info2!("{}", 1f64 as uint); + info2!("{}", 1f64 as float); + info2!("{}", 1f64 as i8); + info2!("{}", 1f64 as i16); + info2!("{}", 1f64 as i32); + info2!("{}", 1f64 as i64); + info2!("{}", 1f64 as u8); + info2!("{}", 1f64 as u16); + info2!("{}", 1f64 as u32); + info2!("{}", 1f64 as u64); + info2!("{}", 1f64 as f32); + info2!("{}", 1f64 as f64); } diff --git a/src/test/run-pass/syntax-extension-cfg.rs b/src/test/run-pass/syntax-extension-cfg.rs index 321929207f7..89ca7de00e2 100644 --- a/src/test/run-pass/syntax-extension-cfg.rs +++ b/src/test/run-pass/syntax-extension-cfg.rs @@ -13,23 +13,23 @@ fn main() { // check - if ! cfg!(foo) { fail!() } - if cfg!(not(foo)) { fail!() } + if ! cfg!(foo) { fail2!() } + if cfg!(not(foo)) { fail2!() } - if ! cfg!(bar(baz)) { fail!() } - if cfg!(not(bar(baz))) { fail!() } + if ! cfg!(bar(baz)) { fail2!() } + if cfg!(not(bar(baz))) { fail2!() } - if ! cfg!(qux="foo") { fail!() } - if cfg!(not(qux="foo")) { fail!() } + if ! cfg!(qux="foo") { fail2!() } + if cfg!(not(qux="foo")) { fail2!() } - if ! cfg!(foo, bar(baz), qux="foo") { fail!() } - if cfg!(not(foo, bar(baz), qux="foo")) { fail!() } + if ! cfg!(foo, bar(baz), qux="foo") { fail2!() } + if cfg!(not(foo, bar(baz), qux="foo")) { fail2!() } - if cfg!(not_a_cfg) { fail!() } - if cfg!(not_a_cfg, foo, bar(baz), qux="foo") { fail!() } + if cfg!(not_a_cfg) { fail2!() } + if cfg!(not_a_cfg, foo, bar(baz), qux="foo") { fail2!() } - if ! cfg!(not(not_a_cfg)) { fail!() } - if ! cfg!(not(not_a_cfg), foo, bar(baz), qux="foo") { fail!() } + if ! cfg!(not(not_a_cfg)) { fail2!() } + if ! cfg!(not(not_a_cfg), foo, bar(baz), qux="foo") { fail2!() } - if cfg!(trailing_comma, ) { fail!() } + if cfg!(trailing_comma, ) { fail2!() } } diff --git a/src/test/run-pass/syntax-extension-fmt.rs b/src/test/run-pass/syntax-extension-fmt.rs index 8e5892b6db1..e778645ad27 100644 --- a/src/test/run-pass/syntax-extension-fmt.rs +++ b/src/test/run-pass/syntax-extension-fmt.rs @@ -8,11 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-flags: --cfg nofmt + extern mod extra; +macro_rules! fmt(($($arg:tt)*) => (oldfmt!($($arg)*))) + fn test(actual: ~str, expected: ~str) { - info!(actual.clone()); - info!(expected.clone()); + info2!("{}", actual.clone()); + info2!("{}", expected.clone()); assert_eq!(actual, expected); } diff --git a/src/test/run-pass/syntax-extension-source-utils-files/includeme.fragment b/src/test/run-pass/syntax-extension-source-utils-files/includeme.fragment index d5cfb94fd0b..5d326a50f02 100644 --- a/src/test/run-pass/syntax-extension-source-utils-files/includeme.fragment +++ b/src/test/run-pass/syntax-extension-source-utils-files/includeme.fragment @@ -3,5 +3,5 @@ { assert!(file!().ends_with("includeme.fragment")); assert!(line!() == 5u); - fmt!("victory robot %u", line!()) + format!("victory robot {}", line!()) } diff --git a/src/test/run-pass/tag-align-shape.rs b/src/test/run-pass/tag-align-shape.rs index ee0b258fd46..6f5ca090052 100644 --- a/src/test/run-pass/tag-align-shape.rs +++ b/src/test/run-pass/tag-align-shape.rs @@ -21,7 +21,7 @@ struct t_rec { pub fn main() { let x = t_rec {c8: 22u8, t: a_tag(44u64)}; - let y = fmt!("%?", x); - info!("y = %s", y); + let y = format!("{:?}", x); + info2!("y = {}", y); assert_eq!(y, ~"t_rec{c8: 22u8, t: a_tag(44u64)}"); } diff --git a/src/test/run-pass/tag-disr-val-shape.rs b/src/test/run-pass/tag-disr-val-shape.rs index d1dec9c44e0..3566eedcb55 100644 --- a/src/test/run-pass/tag-disr-val-shape.rs +++ b/src/test/run-pass/tag-disr-val-shape.rs @@ -17,9 +17,9 @@ enum color { } pub fn main() { - let act = fmt!("%?", red); + let act = format!("{:?}", red); println(act); assert_eq!(~"red", act); - assert_eq!(~"green", fmt!("%?", green)); - assert_eq!(~"white", fmt!("%?", white)); + assert_eq!(~"green", format!("{:?}", green)); + assert_eq!(~"white", format!("{:?}", white)); } diff --git a/src/test/run-pass/tail-cps.rs b/src/test/run-pass/tail-cps.rs index 99371bec58b..9991f05aa3a 100644 --- a/src/test/run-pass/tail-cps.rs +++ b/src/test/run-pass/tail-cps.rs @@ -17,13 +17,13 @@ fn checktrue(rs: bool) -> bool { assert!((rs)); return true; } pub fn main() { let k = checktrue; evenk(42, k); oddk(45, k); } fn evenk(n: int, k: extern fn(bool) -> bool) -> bool { - info!("evenk"); - info!(n); + info2!("evenk"); + info2!("{:?}", n); if n == 0 { return k(true); } else { return oddk(n - 1, k); } } fn oddk(n: int, k: extern fn(bool) -> bool) -> bool { - info!("oddk"); - info!(n); + info2!("oddk"); + info2!("{:?}", n); if n == 0 { return k(false); } else { return evenk(n - 1, k); } } diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs index 7eb879782d1..69d66092abf 100644 --- a/src/test/run-pass/task-comm-0.rs +++ b/src/test/run-pass/task-comm-0.rs @@ -20,21 +20,21 @@ pub fn main() { test05(); } fn test05_start(ch : &Chan) { ch.send(10); - error!("sent 10"); + error2!("sent 10"); ch.send(20); - error!("sent 20"); + error2!("sent 20"); ch.send(30); - error!("sent 30"); + error2!("sent 30"); } fn test05() { let (po, ch) = comm::stream(); task::spawn(|| test05_start(&ch) ); let mut value: int = po.recv(); - error!(value); + error2!("{}", value); value = po.recv(); - error!(value); + error2!("{}", value); value = po.recv(); - error!(value); + error2!("{}", value); assert_eq!(value, 30); } diff --git a/src/test/run-pass/task-comm-1.rs b/src/test/run-pass/task-comm-1.rs index d202bac7089..f169566653a 100644 --- a/src/test/run-pass/task-comm-1.rs +++ b/src/test/run-pass/task-comm-1.rs @@ -12,9 +12,9 @@ use std::task; pub fn main() { test00(); } -fn start() { info!("Started / Finished task."); } +fn start() { info2!("Started / Finished task."); } fn test00() { task::try(|| start() ); - info!("Completing."); + info2!("Completing."); } diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs index fd0d9568845..023bb142e44 100644 --- a/src/test/run-pass/task-comm-10.rs +++ b/src/test/run-pass/task-comm-10.rs @@ -23,10 +23,10 @@ fn start(c: &comm::Chan>) { let mut b; a = p.recv(); assert!(a == ~"A"); - error!(a); + error2!("{:?}", a); b = p.recv(); assert!(b == ~"B"); - error!(b); + error2!("{:?}", b); } pub fn main() { diff --git a/src/test/run-pass/task-comm-12.rs b/src/test/run-pass/task-comm-12.rs index 7e741959a9c..c640bd32bad 100644 --- a/src/test/run-pass/task-comm-12.rs +++ b/src/test/run-pass/task-comm-12.rs @@ -14,7 +14,7 @@ use std::task; pub fn main() { test00(); } -fn start(_task_number: int) { info!("Started / Finished task."); } +fn start(_task_number: int) { info2!("Started / Finished task."); } fn test00() { let i: int = 0; @@ -35,5 +35,5 @@ fn test00() { // Try joining tasks that have already finished. result.unwrap().recv(); - info!("Joined task."); + info2!("Joined task."); } diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs index b039f01bf0c..2bbed1497cc 100644 --- a/src/test/run-pass/task-comm-13.rs +++ b/src/test/run-pass/task-comm-13.rs @@ -21,8 +21,8 @@ fn start(c: &comm::Chan, start: int, number_of_messages: int) { } pub fn main() { - info!("Check that we don't deadlock."); + info2!("Check that we don't deadlock."); let (_p, ch) = comm::stream(); task::try(|| start(&ch, 0, 10) ); - info!("Joined task"); + info2!("Joined task"); } diff --git a/src/test/run-pass/task-comm-14.rs b/src/test/run-pass/task-comm-14.rs index a04e3525d34..cacaea5e8c0 100644 --- a/src/test/run-pass/task-comm-14.rs +++ b/src/test/run-pass/task-comm-14.rs @@ -20,7 +20,7 @@ pub fn main() { // Spawn 10 tasks each sending us back one int. let mut i = 10; while (i > 0) { - info!(i); + info2!("{}", i); let ch = ch.clone(); task::spawn({let i = i; || child(i, &ch)}); i = i - 1; @@ -31,15 +31,15 @@ pub fn main() { i = 10; while (i > 0) { - info!(i); + info2!("{}", i); po.recv(); i = i - 1; } - info!("main thread exiting"); + info2!("main thread exiting"); } fn child(x: int, ch: &comm::SharedChan) { - info!(x); + info2!("{}", x); ch.send(x); } diff --git a/src/test/run-pass/task-comm-3.rs b/src/test/run-pass/task-comm-3.rs index ae6eb6acee4..53c3b7f17ea 100644 --- a/src/test/run-pass/task-comm-3.rs +++ b/src/test/run-pass/task-comm-3.rs @@ -16,24 +16,24 @@ use std::comm::SharedChan; use std::comm; use std::task; -pub fn main() { info!("===== WITHOUT THREADS ====="); test00(); } +pub fn main() { info2!("===== WITHOUT THREADS ====="); test00(); } fn test00_start(ch: &SharedChan, message: int, count: int) { - info!("Starting test00_start"); + info2!("Starting test00_start"); let mut i: int = 0; while i < count { - info!("Sending Message"); + info2!("Sending Message"); ch.send(message + 0); i = i + 1; } - info!("Ending test00_start"); + info2!("Ending test00_start"); } fn test00() { let number_of_tasks: int = 16; let number_of_messages: int = 4; - info!("Creating tasks"); + info2!("Creating tasks"); let (po, ch) = comm::stream(); let ch = comm::SharedChan::new(ch); @@ -67,8 +67,8 @@ fn test00() { // Join spawned tasks... for r in results.iter() { r.recv(); } - info!("Completed: Final number is: "); - error!(sum); + info2!("Completed: Final number is: "); + error2!("{:?}", sum); // assert (sum == (((number_of_tasks * (number_of_tasks - 1)) / 2) * // number_of_messages)); assert_eq!(sum, 480); diff --git a/src/test/run-pass/task-comm-4.rs b/src/test/run-pass/task-comm-4.rs index ecc344e7ba6..80d981b0d45 100644 --- a/src/test/run-pass/task-comm-4.rs +++ b/src/test/run-pass/task-comm-4.rs @@ -24,31 +24,31 @@ fn test00() { c.send(4); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); c.send(5); c.send(6); c.send(7); c.send(8); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); r = p.recv(); sum += r; - info!(r); + info2!("{}", r); assert_eq!(sum, 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8); } diff --git a/src/test/run-pass/task-comm-9.rs b/src/test/run-pass/task-comm-9.rs index 86e3e24a3ee..789425361f8 100644 --- a/src/test/run-pass/task-comm-9.rs +++ b/src/test/run-pass/task-comm-9.rs @@ -38,7 +38,7 @@ fn test00() { let mut i: int = 0; while i < number_of_messages { sum += p.recv(); - info!(r); + info2!("{:?}", r); i += 1; } diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs index cde6cc102af..d4cb175b1bd 100644 --- a/src/test/run-pass/tempfile.rs +++ b/src/test/run-pass/tempfile.rs @@ -34,7 +34,7 @@ fn test_mkdtemp() { // to depend on std fn recursive_mkdir_rel() { let path = Path("frob"); - debug!("recursive_mkdir_rel: Making: %s in cwd %s [%?]", path.to_str(), + debug2!("recursive_mkdir_rel: Making: {} in cwd {} [{:?}]", path.to_str(), os::getcwd().to_str(), os::path_exists(&path)); assert!(os::mkdir_recursive(&path, (S_IRUSR | S_IWUSR | S_IXUSR) as i32)); @@ -52,13 +52,13 @@ fn recursive_mkdir_dot() { fn recursive_mkdir_rel_2() { let path = Path("./frob/baz"); - debug!("recursive_mkdir_rel_2: Making: %s in cwd %s [%?]", path.to_str(), + debug2!("recursive_mkdir_rel_2: Making: {} in cwd {} [{:?}]", path.to_str(), os::getcwd().to_str(), os::path_exists(&path)); assert!(os::mkdir_recursive(&path, (S_IRUSR | S_IWUSR | S_IXUSR) as i32)); assert!(os::path_is_dir(&path)); assert!(os::path_is_dir(&path.pop())); let path2 = Path("quux/blat"); - debug!("recursive_mkdir_rel_2: Making: %s in cwd %s", path2.to_str(), + debug2!("recursive_mkdir_rel_2: Making: {} in cwd {}", path2.to_str(), os::getcwd().to_str()); assert!(os::mkdir_recursive(&path2, (S_IRUSR | S_IWUSR | S_IXUSR) as i32)); assert!(os::path_is_dir(&path2)); @@ -73,7 +73,7 @@ pub fn test_rmdir_recursive_ok() { couldn't create temp dir"); let root = tmpdir.push("foo"); - debug!("making %s", root.to_str()); + debug2!("making {}", root.to_str()); assert!(os::make_dir(&root, rwx)); assert!(os::make_dir(&root.push("foo"), rwx)); assert!(os::make_dir(&root.push("foo").push("bar"), rwx)); diff --git a/src/test/run-pass/terminate-in-initializer.rs b/src/test/run-pass/terminate-in-initializer.rs index 65dd34ade09..a2ba9e69bed 100644 --- a/src/test/run-pass/terminate-in-initializer.rs +++ b/src/test/run-pass/terminate-in-initializer.rs @@ -22,12 +22,12 @@ fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: @int = loop; } } fn test_ret() { let _x: @int = return; } fn test_fail() { - fn f() { let _x: @int = fail!(); } + fn f() { let _x: @int = fail2!(); } task::try(|| f() ); } fn test_fail_indirect() { - fn f() -> ! { fail!(); } + fn f() -> ! { fail2!(); } fn g() { let _x: @int = f(); } task::try(|| g() ); } diff --git a/src/test/run-pass/test-runner-hides-main.rs b/src/test/run-pass/test-runner-hides-main.rs index 3f1e9fe4c51..a399d22cdad 100644 --- a/src/test/run-pass/test-runner-hides-main.rs +++ b/src/test/run-pass/test-runner-hides-main.rs @@ -15,4 +15,4 @@ extern mod extra; // Building as a test runner means that a synthetic main will be run, // not ours -pub fn main() { fail!(); } +pub fn main() { fail2!(); } diff --git a/src/test/run-pass/threads.rs b/src/test/run-pass/threads.rs index 0c82e0194e5..81fcfd7efa0 100644 --- a/src/test/run-pass/threads.rs +++ b/src/test/run-pass/threads.rs @@ -16,7 +16,7 @@ use std::task; pub fn main() { let mut i = 10; while i > 0 { task::spawn({let i = i; || child(i)}); i = i - 1; } - info!("main thread exiting"); + info2!("main thread exiting"); } -fn child(x: int) { info!(x); } +fn child(x: int) { info2!("{}", x); } diff --git a/src/test/run-pass/trait-cast.rs b/src/test/run-pass/trait-cast.rs index dbda29fc227..0d6246655a4 100644 --- a/src/test/run-pass/trait-cast.rs +++ b/src/test/run-pass/trait-cast.rs @@ -38,7 +38,7 @@ impl to_str for Tree { fn to_str_(&self) -> ~str { let (l, r) = (self.left, self.right); let val = &self.val; - fmt!("[%s, %s, %s]", val.to_str_(), l.to_str_(), r.to_str_()) + format!("[{}, {}, {}]", val.to_str_(), l.to_str_(), r.to_str_()) } } diff --git a/src/test/run-pass/trait-to-str.rs b/src/test/run-pass/trait-to-str.rs index 8ecad8d4fe1..baeb9779a7f 100644 --- a/src/test/run-pass/trait-to-str.rs +++ b/src/test/run-pass/trait-to-str.rs @@ -20,7 +20,7 @@ impl to_str for int { impl to_str for ~[T] { fn to_string(&self) -> ~str { - fmt!("[%s]", self.iter().map(|e| e.to_string()).collect::<~[~str]>().connect(", ")) + format!("[{}]", self.iter().map(|e| e.to_string()).to_owned_vec().connect(", ")) } } diff --git a/src/test/run-pass/traits-default-method-macro.rs b/src/test/run-pass/traits-default-method-macro.rs index a78177ea892..340d0bc71aa 100644 --- a/src/test/run-pass/traits-default-method-macro.rs +++ b/src/test/run-pass/traits-default-method-macro.rs @@ -11,7 +11,7 @@ trait Foo { fn bar(&self) -> ~str { - fmt!("test") + format!("test") } } diff --git a/src/test/run-pass/trivial-message.rs b/src/test/run-pass/trivial-message.rs index 2e0cc7e5a57..62b415422a3 100644 --- a/src/test/run-pass/trivial-message.rs +++ b/src/test/run-pass/trivial-message.rs @@ -19,5 +19,5 @@ pub fn main() { let (po, ch) = comm::stream(); ch.send(42); let r = po.recv(); - error!(r); + error2!("{:?}", r); } diff --git a/src/test/run-pass/typeck-macro-interaction-issue-8852.rs b/src/test/run-pass/typeck-macro-interaction-issue-8852.rs index 19a3c52dea8..8de2c1e0814 100644 --- a/src/test/run-pass/typeck-macro-interaction-issue-8852.rs +++ b/src/test/run-pass/typeck-macro-interaction-issue-8852.rs @@ -9,7 +9,7 @@ macro_rules! test( match (a, b) { (A(x), A(y)) => A($e), (B(x), B(y)) => B($e), - _ => fail!() + _ => fail2!() } } ) diff --git a/src/test/run-pass/typeclasses-eq-example-static.rs b/src/test/run-pass/typeclasses-eq-example-static.rs index c14dd0471f9..0d37c0f443d 100644 --- a/src/test/run-pass/typeclasses-eq-example-static.rs +++ b/src/test/run-pass/typeclasses-eq-example-static.rs @@ -61,5 +61,5 @@ pub fn main() { assert!(!Equal::isEq(branch(@leaf(magenta), @leaf(cyan)), branch(@leaf(magenta), @leaf(magenta)))); - error!("Assertions all succeeded!"); + error2!("Assertions all succeeded!"); } diff --git a/src/test/run-pass/typeclasses-eq-example.rs b/src/test/run-pass/typeclasses-eq-example.rs index 18a68bc1c34..11973df2fec 100644 --- a/src/test/run-pass/typeclasses-eq-example.rs +++ b/src/test/run-pass/typeclasses-eq-example.rs @@ -60,5 +60,5 @@ pub fn main() { assert!(!branch(@leaf(magenta), @leaf(cyan)) .isEq(branch(@leaf(magenta), @leaf(magenta)))); - error!("Assertions all succeeded!"); + error2!("Assertions all succeeded!"); } diff --git a/src/test/run-pass/unary-minus-suffix-inference.rs b/src/test/run-pass/unary-minus-suffix-inference.rs index 7300ca989a3..e1ed28bc2cc 100644 --- a/src/test/run-pass/unary-minus-suffix-inference.rs +++ b/src/test/run-pass/unary-minus-suffix-inference.rs @@ -11,43 +11,43 @@ pub fn main() { let a = 1; let a_neg: i8 = -a; - error!(a_neg); + error2!("{}", a_neg); let b = 1; let b_neg: i16 = -b; - error!(b_neg); + error2!("{}", b_neg); let c = 1; let c_neg: i32 = -c; - error!(c_neg); + error2!("{}", c_neg); let d = 1; let d_neg: i64 = -d; - error!(d_neg); + error2!("{}", d_neg); let e = 1; let e_neg: int = -e; - error!(e_neg); + error2!("{}", e_neg); // intentional overflows let f = 1; let f_neg: u8 = -f; - error!(f_neg); + error2!("{}", f_neg); let g = 1; let g_neg: u16 = -g; - error!(g_neg); + error2!("{}", g_neg); let h = 1; let h_neg: u32 = -h; - error!(h_neg); + error2!("{}", h_neg); let i = 1; let i_neg: u64 = -i; - error!(i_neg); + error2!("{}", i_neg); let j = 1; let j_neg: uint = -j; - error!(j_neg); + error2!("{}", j_neg); } diff --git a/src/test/run-pass/unique-copy-box.rs b/src/test/run-pass/unique-copy-box.rs index 16fb4eba5ba..2d91cd9b8a9 100644 --- a/src/test/run-pass/unique-copy-box.rs +++ b/src/test/run-pass/unique-copy-box.rs @@ -18,6 +18,6 @@ pub fn main() { let rc1 = sys::refcount(*i); let j = i.clone(); let rc2 = sys::refcount(*i); - error!("rc1: %u rc2: %u", rc1, rc2); + error2!("rc1: {} rc2: {}", rc1, rc2); assert_eq!(rc1 + 1u, rc2); } diff --git a/src/test/run-pass/unique-decl.rs b/src/test/run-pass/unique-decl.rs index 74b73d77369..14a651943fd 100644 --- a/src/test/run-pass/unique-decl.rs +++ b/src/test/run-pass/unique-decl.rs @@ -13,5 +13,5 @@ pub fn main() { } fn f(_i: ~int) -> ~int { - fail!(); + fail2!(); } diff --git a/src/test/run-pass/unique-in-tag.rs b/src/test/run-pass/unique-in-tag.rs index 0e7d3849461..d0fa48a6c4d 100644 --- a/src/test/run-pass/unique-in-tag.rs +++ b/src/test/run-pass/unique-in-tag.rs @@ -14,7 +14,7 @@ fn test1() { let x = u(~10); assert!(match x { u(a) => { - error!(a); + error2!("{:?}", a); *a } _ => { 66 } diff --git a/src/test/run-pass/unique-log.rs b/src/test/run-pass/unique-log.rs index 37cf6a26235..24342190e3f 100644 --- a/src/test/run-pass/unique-log.rs +++ b/src/test/run-pass/unique-log.rs @@ -10,5 +10,5 @@ pub fn main() { let i = ~100; - error!(i); + error2!("{:?}", i); } diff --git a/src/test/run-pass/unique-pat-3.rs b/src/test/run-pass/unique-pat-3.rs index 78551b701f2..7a9790973d0 100644 --- a/src/test/run-pass/unique-pat-3.rs +++ b/src/test/run-pass/unique-pat-3.rs @@ -14,7 +14,7 @@ enum bar { u(~int), w(int), } pub fn main() { assert!(match u(~10) { u(a) => { - error!(a); + error2!("{:?}", a); *a } _ => { 66 } diff --git a/src/test/run-pass/unique-pat.rs b/src/test/run-pass/unique-pat.rs index 0b9ad6ee194..d33db85eb30 100644 --- a/src/test/run-pass/unique-pat.rs +++ b/src/test/run-pass/unique-pat.rs @@ -11,7 +11,7 @@ fn simple() { match ~true { ~true => { } - _ => { fail!(); } + _ => { fail2!(); } } } diff --git a/src/test/run-pass/unit-like-struct-drop-run.rs b/src/test/run-pass/unit-like-struct-drop-run.rs index 7b450168cc4..2d7234cbe31 100644 --- a/src/test/run-pass/unit-like-struct-drop-run.rs +++ b/src/test/run-pass/unit-like-struct-drop-run.rs @@ -16,7 +16,7 @@ struct Foo; impl Drop for Foo { fn drop(&mut self) { - fail!("This failure should happen."); + fail2!("This failure should happen."); } } diff --git a/src/test/run-pass/unreachable-code-1.rs b/src/test/run-pass/unreachable-code-1.rs index d1896a258c6..e094f874c3f 100644 --- a/src/test/run-pass/unreachable-code-1.rs +++ b/src/test/run-pass/unreachable-code-1.rs @@ -14,7 +14,7 @@ fn id(x: bool) -> bool { x } fn call_id() { - let c = fail!(); + let c = fail2!(); id(c); //~ WARNING unreachable statement } diff --git a/src/test/run-pass/unreachable-code.rs b/src/test/run-pass/unreachable-code.rs index 2c65e2283e8..55a359efeed 100644 --- a/src/test/run-pass/unreachable-code.rs +++ b/src/test/run-pass/unreachable-code.rs @@ -15,7 +15,7 @@ fn id(x: bool) -> bool { x } fn call_id() { - let c = fail!(); + let c = fail2!(); id(c); } diff --git a/src/test/run-pass/unwind-box.rs b/src/test/run-pass/unwind-box.rs index 24e898a90bb..de65d9bbaba 100644 --- a/src/test/run-pass/unwind-box.rs +++ b/src/test/run-pass/unwind-box.rs @@ -14,7 +14,7 @@ use std::task; fn f() { let _a = @0; - fail!(); + fail2!(); } pub fn main() { diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs index f1d5009fe88..85676217d4f 100644 --- a/src/test/run-pass/unwind-resource.rs +++ b/src/test/run-pass/unwind-resource.rs @@ -21,14 +21,14 @@ struct complainer { impl Drop for complainer { fn drop(&mut self) { - error!("About to send!"); + error2!("About to send!"); self.c.send(true); - error!("Sent!"); + error2!("Sent!"); } } fn complainer(c: SharedChan) -> complainer { - error!("Hello!"); + error2!("Hello!"); complainer { c: c } @@ -36,13 +36,13 @@ fn complainer(c: SharedChan) -> complainer { fn f(c: SharedChan) { let _c = complainer(c); - fail!(); + fail2!(); } pub fn main() { let (p, c) = stream(); let c = SharedChan::new(c); task::spawn_unlinked(|| f(c.clone()) ); - error!("hiiiiiiiii"); + error2!("hiiiiiiiii"); assert!(p.recv()); } diff --git a/src/test/run-pass/unwind-resource2.rs b/src/test/run-pass/unwind-resource2.rs index 5b0cd17eea0..751b9430e3b 100644 --- a/src/test/run-pass/unwind-resource2.rs +++ b/src/test/run-pass/unwind-resource2.rs @@ -29,7 +29,7 @@ fn complainer(c: @int) -> complainer { fn f() { let _c = complainer(@0); - fail!(); + fail2!(); } pub fn main() { diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index 0038392115b..07610fe7115 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -14,7 +14,7 @@ use std::task; fn f() { let _a = ~0; - fail!(); + fail2!(); } pub fn main() { diff --git a/src/test/run-pass/use-uninit-match.rs b/src/test/run-pass/use-uninit-match.rs index 4e0e5347d4d..18698a48613 100644 --- a/src/test/run-pass/use-uninit-match.rs +++ b/src/test/run-pass/use-uninit-match.rs @@ -21,4 +21,4 @@ fn foo(o: myoption) -> int { enum myoption { none, some(T), } -pub fn main() { info!(5); } +pub fn main() { info2!("{}", 5); } diff --git a/src/test/run-pass/use-uninit-match2.rs b/src/test/run-pass/use-uninit-match2.rs index 46d3bef86b5..844b0521f3a 100644 --- a/src/test/run-pass/use-uninit-match2.rs +++ b/src/test/run-pass/use-uninit-match2.rs @@ -13,7 +13,7 @@ fn foo(o: myoption) -> int { let mut x: int; match o { - none:: => { fail!(); } + none:: => { fail2!(); } some::(_t) => { x = 5; } } return x; @@ -21,4 +21,4 @@ fn foo(o: myoption) -> int { enum myoption { none, some(T), } -pub fn main() { info!(5); } +pub fn main() { info2!("{}", 5); } diff --git a/src/test/run-pass/utf8.rs b/src/test/run-pass/utf8.rs index 0eb3fd75dc3..5222b0eb984 100644 --- a/src/test/run-pass/utf8.rs +++ b/src/test/run-pass/utf8.rs @@ -42,10 +42,10 @@ pub fn main() { fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.byte_iter() { - info!(i); - info!(ab); + info2!("{}", i); + info2!("{}", ab); let bb: u8 = b[i]; - info!(bb); + info2!("{}", bb); assert_eq!(ab, bb); i += 1; } diff --git a/src/test/run-pass/vec-concat.rs b/src/test/run-pass/vec-concat.rs index 54fe4408e48..0a8a9b1bab7 100644 --- a/src/test/run-pass/vec-concat.rs +++ b/src/test/run-pass/vec-concat.rs @@ -13,7 +13,7 @@ pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; - info!(v[9]); + info2!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); diff --git a/src/test/run-pass/vec-late-init.rs b/src/test/run-pass/vec-late-init.rs index 3b07a4ecbcb..e11bd257d42 100644 --- a/src/test/run-pass/vec-late-init.rs +++ b/src/test/run-pass/vec-late-init.rs @@ -13,5 +13,5 @@ pub fn main() { let mut later: ~[int]; if true { later = ~[1]; } else { later = ~[2]; } - info!(later[0]); + info2!("{}", later[0]); } diff --git a/src/test/run-pass/vec-matching-autoslice.rs b/src/test/run-pass/vec-matching-autoslice.rs index 2ad21aba6cd..8965ee68842 100644 --- a/src/test/run-pass/vec-matching-autoslice.rs +++ b/src/test/run-pass/vec-matching-autoslice.rs @@ -1,22 +1,22 @@ pub fn main() { let x = @[1, 2, 3]; match x { - [2, .._] => fail!(), + [2, .._] => fail2!(), [1, ..tail] => { assert_eq!(tail, [2, 3]); } - [_] => fail!(), - [] => fail!() + [_] => fail2!(), + [] => fail2!() } let y = (~[(1, true), (2, false)], 0.5); match y { - ([_, _, _], 0.5) => fail!(), + ([_, _, _], 0.5) => fail2!(), ([(1, a), (b, false), ..tail], _) => { assert_eq!(a, true); assert_eq!(b, 2); assert!(tail.is_empty()); } - ([.._tail], _) => fail!() + ([.._tail], _) => fail2!() } } diff --git a/src/test/run-pass/vec-matching.rs b/src/test/run-pass/vec-matching.rs index c09fb8d6bc7..dec29c8da53 100644 --- a/src/test/run-pass/vec-matching.rs +++ b/src/test/run-pass/vec-matching.rs @@ -1,14 +1,14 @@ fn a() { let x = ~[1]; match x { - [_, _, _, _, _, .._] => fail!(), - [.._, _, _, _, _] => fail!(), - [_, .._, _, _] => fail!(), - [_, _] => fail!(), + [_, _, _, _, _, .._] => fail2!(), + [.._, _, _, _, _] => fail2!(), + [_, .._, _, _] => fail2!(), + [_, _] => fail2!(), [a] => { assert_eq!(a, 1); } - [] => fail!() + [] => fail2!() } } @@ -20,7 +20,7 @@ fn b() { assert_eq!(b, 2); assert_eq!(c, &[3]); } - _ => fail!() + _ => fail2!() } match x { [..a, b, c] => { @@ -28,7 +28,7 @@ fn b() { assert_eq!(b, 2); assert_eq!(c, 3); } - _ => fail!() + _ => fail2!() } match x { [a, ..b, c] => { @@ -36,7 +36,7 @@ fn b() { assert_eq!(b, &[2]); assert_eq!(c, 3); } - _ => fail!() + _ => fail2!() } match x { [a, b, c] => { @@ -44,14 +44,14 @@ fn b() { assert_eq!(b, 2); assert_eq!(c, 3); } - _ => fail!() + _ => fail2!() } } fn c() { let x = [1]; match x { - [2, .. _] => fail!(), + [2, .. _] => fail2!(), [.. _] => () } } diff --git a/src/test/run-pass/vec-self-append.rs b/src/test/run-pass/vec-self-append.rs index ef661c7ed67..4d5286502b7 100644 --- a/src/test/run-pass/vec-self-append.rs +++ b/src/test/run-pass/vec-self-append.rs @@ -47,7 +47,7 @@ fn test_loop() { let mut i = 20; let mut expected_len = 1u; while i > 0 { - error!(a.len()); + error2!("{}", a.len()); assert_eq!(a.len(), expected_len); a = a + a; // FIXME(#3387)---can't write a += a i -= 1; diff --git a/src/test/run-pass/weird-exprs.rs b/src/test/run-pass/weird-exprs.rs index 7c20f9823d9..16070049151 100644 --- a/src/test/run-pass/weird-exprs.rs +++ b/src/test/run-pass/weird-exprs.rs @@ -61,17 +61,17 @@ fn canttouchthis() -> uint { fn p() -> bool { true } let _a = (assert!((true)) == (assert!(p()))); let _c = (assert!((p())) == ()); - let _b: bool = (info!("%d", 0) == (return 0u)); + let _b: bool = (info2!("{}", 0) == (return 0u)); } fn angrydome() { loop { if break { } } let mut i = 0; - loop { i += 1; if i == 1 { match (loop) { 1 => { }, _ => fail!("wat") } } + loop { i += 1; if i == 1 { match (loop) { 1 => { }, _ => fail2!("wat") } } break; } } -fn evil_lincoln() { let _evil = info!("lincoln"); } +fn evil_lincoln() { let _evil = info2!("lincoln"); } pub fn main() { strange(); diff --git a/src/test/run-pass/while-cont.rs b/src/test/run-pass/while-cont.rs index f0e6d4b45a5..44c3225bb15 100644 --- a/src/test/run-pass/while-cont.rs +++ b/src/test/run-pass/while-cont.rs @@ -13,7 +13,7 @@ pub fn main() { let mut i = 1; while i > 0 { assert!((i > 0)); - info!(i); + info2!("{}", i); i -= 1; continue; } diff --git a/src/test/run-pass/while-loop-constraints-2.rs b/src/test/run-pass/while-loop-constraints-2.rs index fb629a8deae..a07d122c8e2 100644 --- a/src/test/run-pass/while-loop-constraints-2.rs +++ b/src/test/run-pass/while-loop-constraints-2.rs @@ -18,7 +18,7 @@ pub fn main() { while z < 50 { z += 1; while false { x = y; y = z; } - info!(y); + info2!("{}", y); } assert!((y == 42 && z == 50)); } diff --git a/src/test/run-pass/while-with-break.rs b/src/test/run-pass/while-with-break.rs index 185b686c24e..05eea29b31d 100644 --- a/src/test/run-pass/while-with-break.rs +++ b/src/test/run-pass/while-with-break.rs @@ -5,13 +5,13 @@ pub fn main() { let mut i: int = 90; while i < 100 { - info!(i); + info2!("{}", i); i = i + 1; if i == 95 { let _v: ~[int] = ~[1, 2, 3, 4, 5]; // we check that it is freed by break - info!("breaking"); + info2!("breaking"); break; } } diff --git a/src/test/run-pass/while.rs b/src/test/run-pass/while.rs index 8c6186ef10e..4295c89865f 100644 --- a/src/test/run-pass/while.rs +++ b/src/test/run-pass/while.rs @@ -13,10 +13,10 @@ pub fn main() { let mut x: int = 10; let mut y: int = 0; - while y < x { info!(y); info!("hello"); y = y + 1; } + while y < x { info2!("{}", y); info2!("hello"); y = y + 1; } while x > 0 { - info!("goodbye"); + info2!("goodbye"); x = x - 1; - info!(x); + info2!("{}", x); } } diff --git a/src/test/run-pass/writealias.rs b/src/test/run-pass/writealias.rs index 2db954d27c1..06c2ca7be0b 100644 --- a/src/test/run-pass/writealias.rs +++ b/src/test/run-pass/writealias.rs @@ -22,7 +22,7 @@ pub fn main() { Some(ref z) if z.with(|b| *b) => { do z.with |b| { assert!(*b); } }, - _ => fail!() + _ => fail2!() } } } diff --git a/src/test/run-pass/yield.rs b/src/test/run-pass/yield.rs index 040084df911..48079843dfe 100644 --- a/src/test/run-pass/yield.rs +++ b/src/test/run-pass/yield.rs @@ -16,14 +16,14 @@ pub fn main() { let mut builder = task::task(); builder.future_result(|r| { result = Some(r); }); builder.spawn(child); - error!("1"); + error2!("1"); task::deschedule(); - error!("2"); + error2!("2"); task::deschedule(); - error!("3"); + error2!("3"); result.unwrap().recv(); } fn child() { - error!("4"); task::deschedule(); error!("5"); task::deschedule(); error!("6"); + error2!("4"); task::deschedule(); error2!("5"); task::deschedule(); error2!("6"); } diff --git a/src/test/run-pass/yield1.rs b/src/test/run-pass/yield1.rs index cee7f5f4ef0..4cfa3a95236 100644 --- a/src/test/run-pass/yield1.rs +++ b/src/test/run-pass/yield1.rs @@ -16,9 +16,9 @@ pub fn main() { let mut builder = task::task(); builder.future_result(|r| { result = Some(r); }); builder.spawn(child); - error!("1"); + error2!("1"); task::deschedule(); result.unwrap().recv(); } -fn child() { error!("2"); } +fn child() { error2!("2"); } diff --git a/src/test/run-pass/yield2.rs b/src/test/run-pass/yield2.rs index 5e3dde02572..6dc96536540 100644 --- a/src/test/run-pass/yield2.rs +++ b/src/test/run-pass/yield2.rs @@ -13,5 +13,5 @@ use std::task; pub fn main() { let mut i: int = 0; - while i < 100 { i = i + 1; error!(i); task::deschedule(); } + while i < 100 { i = i + 1; error2!("{}", i); task::deschedule(); } }