diff options
89 files changed, 114 insertions, 114 deletions
diff --git a/src/test/run-fail/args-fail.rs b/src/test/run-fail/args-fail.rs index b803d7488b0..d936368cc33 100644 --- a/src/test/run-fail/args-fail.rs +++ b/src/test/run-fail/args-fail.rs @@ -9,6 +9,6 @@ // except according to those terms. // error-pattern:meep -fn f(_a: int, _b: int, _c: @int) { fail!("moop"); } +fn f(_a: int, _b: int, _c: @int) { fail2!("moop"); } -fn main() { f(1, fail!("meep"), @42); } +fn main() { f(1, fail2!("meep"), @42); } diff --git a/src/test/run-fail/assert-macro-fmt.rs b/src/test/run-fail/assert-macro-fmt.rs index 2159f68cc71..53a37c5d684 100644 --- a/src/test/run-fail/assert-macro-fmt.rs +++ b/src/test/run-fail/assert-macro-fmt.rs @@ -11,5 +11,5 @@ // error-pattern:failed at 'test-assert-fmt 42 rust' fn main() { - assert!(false, "test-assert-fmt %d %s", 42, "rust"); + assert!(false, "test-assert-fmt {} {}", 42, "rust"); } diff --git a/src/test/run-fail/binop-fail-2.rs b/src/test/run-fail/binop-fail-2.rs index a49f96fced5..1038d2025c7 100644 --- a/src/test/run-fail/binop-fail-2.rs +++ b/src/test/run-fail/binop-fail-2.rs @@ -9,5 +9,5 @@ // except according to those terms. // error-pattern:quux -fn my_err(s: ~str) -> ! { error!(s); fail!("quux"); } +fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); } fn main() { 3u == my_err(~"bye"); } diff --git a/src/test/run-fail/binop-fail-3.rs b/src/test/run-fail/binop-fail-3.rs index 150544f16af..b46d5251e22 100644 --- a/src/test/run-fail/binop-fail-3.rs +++ b/src/test/run-fail/binop-fail-3.rs @@ -9,5 +9,5 @@ // except according to those terms. // error-pattern:quux -fn foo() -> ! { fail!("quux"); } +fn foo() -> ! { fail2!("quux"); } fn main() { foo() == foo(); } diff --git a/src/test/run-fail/binop-fail.rs b/src/test/run-fail/binop-fail.rs index a49f96fced5..1038d2025c7 100644 --- a/src/test/run-fail/binop-fail.rs +++ b/src/test/run-fail/binop-fail.rs @@ -9,5 +9,5 @@ // except according to those terms. // error-pattern:quux -fn my_err(s: ~str) -> ! { error!(s); fail!("quux"); } +fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); } fn main() { 3u == my_err(~"bye"); } diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow.rs b/src/test/run-fail/bug-2470-bounds-check-overflow.rs index 0fdaf31c593..083ea5b8f19 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow.rs @@ -24,13 +24,13 @@ fn main() { do x.as_imm_buf |p, _len| { let base = p as uint; let idx = base / sys::size_of::<uint>(); - error!("ov1 base = 0x%x", base); - error!("ov1 idx = 0x%x", idx); - error!("ov1 sizeof::<uint>() = 0x%x", sys::size_of::<uint>()); - error!("ov1 idx * sizeof::<uint>() = 0x%x", + error2!("ov1 base = 0x{:x}", base); + error2!("ov1 idx = 0x{:x}", idx); + error2!("ov1 sizeof::<uint>() = 0x{:x}", sys::size_of::<uint>()); + error2!("ov1 idx * sizeof::<uint>() = 0x{:x}", idx * sys::size_of::<uint>()); // This should fail. - error!("ov1 0x%x", x[idx]); + error2!("ov1 0x{:x}", x[idx]); } } diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs index 2a256b9a4e3..b41062043cf 100644 --- a/src/test/run-fail/bug-811.rs +++ b/src/test/run-fail/bug-811.rs @@ -19,6 +19,6 @@ struct chan_t<T> { port: port_id, } -fn send<T:Send>(_ch: chan_t<T>, _data: T) { fail!(); } +fn send<T:Send>(_ch: chan_t<T>, _data: T) { fail2!(); } -fn main() { fail!("quux"); } +fn main() { fail2!("quux"); } diff --git a/src/test/run-fail/die-macro-expr.rs b/src/test/run-fail/die-macro-expr.rs index 8ff62d5a43d..3310ffe909a 100644 --- a/src/test/run-fail/die-macro-expr.rs +++ b/src/test/run-fail/die-macro-expr.rs @@ -1,5 +1,5 @@ // error-pattern:test fn main() { - let _i: int = fail!("test"); + let _i: int = fail2!("test"); } diff --git a/src/test/run-fail/die-macro-pure.rs b/src/test/run-fail/die-macro-pure.rs index bb62a7e8bef..6d0f5909c4d 100644 --- a/src/test/run-fail/die-macro-pure.rs +++ b/src/test/run-fail/die-macro-pure.rs @@ -1,7 +1,7 @@ // error-pattern:test fn f() { - fail!("test"); + fail2!("test"); } fn main() { diff --git a/src/test/run-fail/die-macro.rs b/src/test/run-fail/die-macro.rs index 71cc7317e6e..678ac655580 100644 --- a/src/test/run-fail/die-macro.rs +++ b/src/test/run-fail/die-macro.rs @@ -1,5 +1,5 @@ // error-pattern:test fn main() { - fail!("test"); + fail2!("test"); } diff --git a/src/test/run-fail/doublefail.rs b/src/test/run-fail/doublefail.rs index 1ceeee1b6ed..ee59823e8ad 100644 --- a/src/test/run-fail/doublefail.rs +++ b/src/test/run-fail/doublefail.rs @@ -12,6 +12,6 @@ //error-pattern:One fn main() { - fail!("One"); - fail!("Two"); + fail2!("One"); + fail2!("Two"); } diff --git a/src/test/run-fail/explicit-fail-msg.rs b/src/test/run-fail/explicit-fail-msg.rs index ab8cea0a305..c1d2e986f12 100644 --- a/src/test/run-fail/explicit-fail-msg.rs +++ b/src/test/run-fail/explicit-fail-msg.rs @@ -15,5 +15,5 @@ fn main() { let mut a = 1; if 1 == 1 { a = 2; } - fail!(~"woooo" + "o"); + fail2!(~"woooo" + "o"); } diff --git a/src/test/run-fail/explicit-fail.rs b/src/test/run-fail/explicit-fail.rs index 8c204b66e36..78a407bbbd5 100644 --- a/src/test/run-fail/explicit-fail.rs +++ b/src/test/run-fail/explicit-fail.rs @@ -12,4 +12,4 @@ // error-pattern:explicit -fn main() { fail!(); } +fn main() { fail2!(); } diff --git a/src/test/run-fail/expr-fn-fail.rs b/src/test/run-fail/expr-fn-fail.rs index e645ea34df5..a8714fdbdc8 100644 --- a/src/test/run-fail/expr-fn-fail.rs +++ b/src/test/run-fail/expr-fn-fail.rs @@ -12,6 +12,6 @@ // error-pattern:explicit failure -fn f() -> ! { fail!() } +fn f() -> ! { fail2!() } fn main() { f(); } diff --git a/src/test/run-fail/expr-if-fail-fn.rs b/src/test/run-fail/expr-if-fail-fn.rs index 99f798147f2..8ecc2cdf0f4 100644 --- a/src/test/run-fail/expr-if-fail-fn.rs +++ b/src/test/run-fail/expr-if-fail-fn.rs @@ -12,7 +12,7 @@ // error-pattern:explicit failure -fn f() -> ! { fail!() } +fn f() -> ! { fail2!() } fn g() -> int { let x = if true { f() } else { 10 }; return x; } diff --git a/src/test/run-fail/expr-if-fail.rs b/src/test/run-fail/expr-if-fail.rs index 73259e6e140..50778f65560 100644 --- a/src/test/run-fail/expr-if-fail.rs +++ b/src/test/run-fail/expr-if-fail.rs @@ -12,4 +12,4 @@ // error-pattern:explicit failure -fn main() { let _x = if false { 0 } else if true { fail!() } else { 10 }; } +fn main() { let _x = if false { 0 } else if true { fail2!() } else { 10 }; } diff --git a/src/test/run-fail/expr-match-fail-fn.rs b/src/test/run-fail/expr-match-fail-fn.rs index 6476e57a35b..98cc3c230a0 100644 --- a/src/test/run-fail/expr-match-fail-fn.rs +++ b/src/test/run-fail/expr-match-fail-fn.rs @@ -12,7 +12,7 @@ // error-pattern:explicit failure -fn f() -> ! { fail!() } +fn f() -> ! { fail2!() } fn g() -> int { let x = match true { true => { f() } false => { 10 } }; return x; } diff --git a/src/test/run-fail/expr-match-fail.rs b/src/test/run-fail/expr-match-fail.rs index 075f6f5b4b1..c8cab907d7d 100644 --- a/src/test/run-fail/expr-match-fail.rs +++ b/src/test/run-fail/expr-match-fail.rs @@ -12,4 +12,4 @@ // error-pattern:explicit failure -fn main() { let _x = match true { false => { 0 } true => { fail!() } }; } +fn main() { let _x = match true { false => { 0 } true => { fail2!() } }; } diff --git a/src/test/run-fail/extern-fail.rs b/src/test/run-fail/extern-fail.rs index ce5ea56502c..17059107c01 100644 --- a/src/test/run-fail/extern-fail.rs +++ b/src/test/run-fail/extern-fail.rs @@ -45,7 +45,7 @@ fn main() { do task::spawn { let result = count(5u); info!("result = %?", result); - fail!(); + fail2!(); }; } } diff --git a/src/test/run-fail/fail-arg.rs b/src/test/run-fail/fail-arg.rs index 844bac9d3d0..29baa4b3170 100644 --- a/src/test/run-fail/fail-arg.rs +++ b/src/test/run-fail/fail-arg.rs @@ -9,6 +9,6 @@ // except according to those terms. // error-pattern:woe -fn f(a: int) { info!(a); } +fn f(a: int) { info2!("{}", a); } -fn main() { f(fail!("woe")); } +fn main() { f(fail2!("woe")); } diff --git a/src/test/run-fail/fail-macro-explicit.rs b/src/test/run-fail/fail-macro-explicit.rs index 13e3a6a31a8..ca6abee03bf 100644 --- a/src/test/run-fail/fail-macro-explicit.rs +++ b/src/test/run-fail/fail-macro-explicit.rs @@ -11,5 +11,5 @@ // error-pattern:failed at 'explicit failure' fn main() { - fail!(); + fail2!(); } diff --git a/src/test/run-fail/fail-macro-fmt.rs b/src/test/run-fail/fail-macro-fmt.rs index 5fc51ac6745..90d9ff9b0ec 100644 --- a/src/test/run-fail/fail-macro-fmt.rs +++ b/src/test/run-fail/fail-macro-fmt.rs @@ -11,5 +11,5 @@ // error-pattern:failed at 'test-fail-fmt 42 rust' fn main() { - fail!("test-fail-fmt %d %s", 42, "rust"); + fail2!("test-fail-fmt {} {}", 42, "rust"); } diff --git a/src/test/run-fail/fail-macro-owned.rs b/src/test/run-fail/fail-macro-owned.rs index e59f5bdcaa1..fa461fefb88 100644 --- a/src/test/run-fail/fail-macro-owned.rs +++ b/src/test/run-fail/fail-macro-owned.rs @@ -11,5 +11,5 @@ // error-pattern:failed at 'test-fail-owned' fn main() { - fail!("test-fail-owned"); + fail2!("test-fail-owned"); } diff --git a/src/test/run-fail/fail-macro-static.rs b/src/test/run-fail/fail-macro-static.rs index 688ca4ce7e5..f05a68a5fcb 100644 --- a/src/test/run-fail/fail-macro-static.rs +++ b/src/test/run-fail/fail-macro-static.rs @@ -11,5 +11,5 @@ // error-pattern:failed at 'test-fail-static' fn main() { - fail!("test-fail-static"); + fail2!("test-fail-static"); } diff --git a/src/test/run-fail/fail-main.rs b/src/test/run-fail/fail-main.rs index f007e03041c..2691beed272 100644 --- a/src/test/run-fail/fail-main.rs +++ b/src/test/run-fail/fail-main.rs @@ -10,4 +10,4 @@ // error-pattern:moop extern mod extra; -fn main() { fail!("moop"); } +fn main() { fail2!("moop"); } diff --git a/src/test/run-fail/fail-parens.rs b/src/test/run-fail/fail-parens.rs index 90a44e42759..79f46f47fb3 100644 --- a/src/test/run-fail/fail-parens.rs +++ b/src/test/run-fail/fail-parens.rs @@ -13,8 +13,8 @@ // error-pattern:oops fn bigfail() { - while (fail!("oops")) { if (fail!()) { - match (fail!()) { () => { + while (fail2!("oops")) { if (fail2!()) { + match (fail2!()) { () => { } } }}; diff --git a/src/test/run-fail/fmt-fail.rs b/src/test/run-fail/fmt-fail.rs index d34ca029023..1c6298a6c8d 100644 --- a/src/test/run-fail/fmt-fail.rs +++ b/src/test/run-fail/fmt-fail.rs @@ -11,4 +11,4 @@ // error-pattern:meh extern mod extra; -fn main() { let str_var: ~str = ~"meh"; fail!(fmt!("%s", str_var)); } +fn main() { let str_var: ~str = ~"meh"; fail2!("{}", str_var); } diff --git a/src/test/run-fail/for-each-loop-fail.rs b/src/test/run-fail/for-each-loop-fail.rs index 3c9397fc07f..032460d2079 100644 --- a/src/test/run-fail/for-each-loop-fail.rs +++ b/src/test/run-fail/for-each-loop-fail.rs @@ -11,4 +11,4 @@ // error-pattern:moop extern mod extra; -fn main() { for _ in range(0u, 10u) { fail!("moop"); } } +fn main() { for _ in range(0u, 10u) { fail2!("moop"); } } diff --git a/src/test/run-fail/if-check-fail.rs b/src/test/run-fail/if-check-fail.rs index f7d37d15329..e8a1cad53ad 100644 --- a/src/test/run-fail/if-check-fail.rs +++ b/src/test/run-fail/if-check-fail.rs @@ -17,9 +17,9 @@ fn even(x: uint) -> bool { fn foo(x: uint) { if even(x) { - info!(x); + info2!("{}", x); } else { - fail!("Number is odd"); + fail2!("Number is odd"); } } diff --git a/src/test/run-fail/if-cond-bot.rs b/src/test/run-fail/if-cond-bot.rs index 9a36681da5f..d596a11f1cb 100644 --- a/src/test/run-fail/if-cond-bot.rs +++ b/src/test/run-fail/if-cond-bot.rs @@ -9,5 +9,5 @@ // except according to those terms. // error-pattern:quux -fn my_err(s: ~str) -> ! { error!(s); fail!("quux"); } +fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); } fn main() { if my_err(~"bye") { } } diff --git a/src/test/run-fail/issue-2156.rs b/src/test/run-fail/issue-2156.rs index 863663334f8..78422347f78 100644 --- a/src/test/run-fail/issue-2156.rs +++ b/src/test/run-fail/issue-2156.rs @@ -19,6 +19,6 @@ use std::io; fn main() { do io::with_str_reader(~"") |rdr| { - match rdr.read_char() { '=' => { } _ => { fail!() } } + match rdr.read_char() { '=' => { } _ => { fail2!() } } } } diff --git a/src/test/run-fail/issue-2272.rs b/src/test/run-fail/issue-2272.rs index 5ce89bc1814..9b8ecca96a6 100644 --- a/src/test/run-fail/issue-2272.rs +++ b/src/test/run-fail/issue-2272.rs @@ -22,5 +22,5 @@ fn main() { }, a: ~0 }; - fail!(); + fail2!(); } diff --git a/src/test/run-fail/issue-2444.rs b/src/test/run-fail/issue-2444.rs index c1357988f7d..b15c54c7b6e 100644 --- a/src/test/run-fail/issue-2444.rs +++ b/src/test/run-fail/issue-2444.rs @@ -15,7 +15,7 @@ use extra::arc; enum e<T> { e(arc::Arc<T>) } -fn foo() -> e<int> {fail!();} +fn foo() -> e<int> {fail2!();} fn main() { let _f = foo(); diff --git a/src/test/run-fail/issue-3029.rs b/src/test/run-fail/issue-3029.rs index 44364007c06..5d20c49945e 100644 --- a/src/test/run-fail/issue-3029.rs +++ b/src/test/run-fail/issue-3029.rs @@ -16,7 +16,7 @@ fn main() { let mut x = ~[]; let y = ~[3]; - fail!("so long"); + fail2!("so long"); x.push_all_move(y); ~"good" + ~"bye"; } diff --git a/src/test/run-fail/issue-948.rs b/src/test/run-fail/issue-948.rs index db954bc5946..39d741e5169 100644 --- a/src/test/run-fail/issue-948.rs +++ b/src/test/run-fail/issue-948.rs @@ -16,5 +16,5 @@ struct Point { x: int, y: int } fn main() { let origin = Point {x: 0, y: 0}; - let f: Point = Point {x: (fail!("beep boop")),.. origin}; + let f: Point = Point {x: (fail2!("beep boop")),.. origin}; } diff --git a/src/test/run-fail/linked-failure2.rs b/src/test/run-fail/linked-failure2.rs index 52a67872d4c..d99cfe40da4 100644 --- a/src/test/run-fail/linked-failure2.rs +++ b/src/test/run-fail/linked-failure2.rs @@ -16,7 +16,7 @@ use std::comm; use std::task; -fn child() { fail!(); } +fn child() { fail2!(); } fn main() { let (p, _c) = comm::stream::<()>(); diff --git a/src/test/run-fail/linked-failure3.rs b/src/test/run-fail/linked-failure3.rs index f40eae20bc0..fd330bba1c5 100644 --- a/src/test/run-fail/linked-failure3.rs +++ b/src/test/run-fail/linked-failure3.rs @@ -16,7 +16,7 @@ use std::comm; use std::task; -fn grandchild() { fail!("grandchild dies"); } +fn grandchild() { fail2!("grandchild dies"); } fn child() { let (p, _c) = comm::stream::<int>(); diff --git a/src/test/run-fail/match-bot-fail.rs b/src/test/run-fail/match-bot-fail.rs index a54422ef8f5..7b1d6bea499 100644 --- a/src/test/run-fail/match-bot-fail.rs +++ b/src/test/run-fail/match-bot-fail.rs @@ -17,6 +17,6 @@ fn foo(s: ~str) { } fn main() { let i = - match Some::<int>(3) { None::<int> => { fail!() } Some::<int>(_) => { fail!() } }; + match Some::<int>(3) { None::<int> => { fail2!() } Some::<int>(_) => { fail2!() } }; foo(i); } diff --git a/src/test/run-fail/match-disc-bot.rs b/src/test/run-fail/match-disc-bot.rs index 13ccd118c61..9b38a381a58 100644 --- a/src/test/run-fail/match-disc-bot.rs +++ b/src/test/run-fail/match-disc-bot.rs @@ -9,6 +9,6 @@ // except according to those terms. // error-pattern:quux -fn f() -> ! { fail!("quux") } +fn f() -> ! { fail2!("quux") } fn g() -> int { match f() { true => { 1 } false => { 0 } } } fn main() { g(); } diff --git a/src/test/run-fail/match-wildcards.rs b/src/test/run-fail/match-wildcards.rs index 22613f45b3b..535b3340a4d 100644 --- a/src/test/run-fail/match-wildcards.rs +++ b/src/test/run-fail/match-wildcards.rs @@ -11,10 +11,10 @@ // error-pattern:squirrelcupcake fn cmp() -> int { match (Some('a'), None::<char>) { - (Some(_), _) => { fail!("squirrelcupcake"); } - (_, Some(_)) => { fail!(); } - _ => { fail!("wat"); } + (Some(_), _) => { fail2!("squirrelcupcake"); } + (_, Some(_)) => { fail2!(); } + _ => { fail2!("wat"); } } } -fn main() { error!(cmp()); } +fn main() { error2!("{}", cmp()); } diff --git a/src/test/run-fail/morestack1.rs b/src/test/run-fail/morestack1.rs index d3e3be6c2ca..35c19c47f52 100644 --- a/src/test/run-fail/morestack1.rs +++ b/src/test/run-fail/morestack1.rs @@ -14,7 +14,7 @@ fn getbig(i: int) { if i != 0 { getbig(i - 1); } else { - fail!(); + fail2!(); } } diff --git a/src/test/run-fail/morestack2.rs b/src/test/run-fail/morestack2.rs index 5ac30926400..9af45cebe68 100644 --- a/src/test/run-fail/morestack2.rs +++ b/src/test/run-fail/morestack2.rs @@ -35,7 +35,7 @@ fn getbig_call_c_and_fail(i: int) { } else { unsafe { rustrt::rust_get_argc(); - fail!(); + fail2!(); } } } diff --git a/src/test/run-fail/morestack3.rs b/src/test/run-fail/morestack3.rs index e6f219710b3..fea91551161 100644 --- a/src/test/run-fail/morestack3.rs +++ b/src/test/run-fail/morestack3.rs @@ -22,7 +22,7 @@ fn getbig_and_fail(i: int) { if i != 0 { getbig_and_fail(i - 1); } else { - fail!(); + fail2!(); } } diff --git a/src/test/run-fail/morestack4.rs b/src/test/run-fail/morestack4.rs index 02a65e91d04..a4df5e57923 100644 --- a/src/test/run-fail/morestack4.rs +++ b/src/test/run-fail/morestack4.rs @@ -22,7 +22,7 @@ fn getbig_and_fail(i: int) { if i != 0 { getbig_and_fail(i - 1); } else { - fail!(); + fail2!(); } } diff --git a/src/test/run-fail/result-get-fail.rs b/src/test/run-fail/result-get-fail.rs index 4f552bc8f42..c3f4250b053 100644 --- a/src/test/run-fail/result-get-fail.rs +++ b/src/test/run-fail/result-get-fail.rs @@ -13,5 +13,5 @@ use std::result; fn main() { - error!(result::Err::<int,~str>(~"kitty").unwrap()); + error2!("{:?}", result::Err::<int,~str>(~"kitty").unwrap()); } diff --git a/src/test/run-fail/rhs-type.rs b/src/test/run-fail/rhs-type.rs index ca267608025..5e09536fb4d 100644 --- a/src/test/run-fail/rhs-type.rs +++ b/src/test/run-fail/rhs-type.rs @@ -18,6 +18,6 @@ struct T { t: ~str } fn main() { - let pth = fail!("bye"); + let pth = fail2!("bye"); let _rs: T = T {t: pth}; } diff --git a/src/test/run-fail/rt-set-exit-status-fail.rs b/src/test/run-fail/rt-set-exit-status-fail.rs index 6b5c2b554a4..5c854825c28 100644 --- a/src/test/run-fail/rt-set-exit-status-fail.rs +++ b/src/test/run-fail/rt-set-exit-status-fail.rs @@ -13,10 +13,10 @@ use std::os; fn main() { - error!(~"whatever"); + error2!("whatever"); // Setting the exit status only works when the scheduler terminates // normally. In this case we're going to fail, so instead of of // returning 50 the process will return the typical rt failure code. os::set_exit_status(50); - fail!(); + fail2!(); } diff --git a/src/test/run-fail/rt-set-exit-status-fail2.rs b/src/test/run-fail/rt-set-exit-status-fail2.rs index 01f74585090..493420e3ee6 100644 --- a/src/test/run-fail/rt-set-exit-status-fail2.rs +++ b/src/test/run-fail/rt-set-exit-status-fail2.rs @@ -33,9 +33,9 @@ fn r(x:int) -> r { } fn main() { - error!(~"whatever"); + error2!("whatever"); do task::spawn { let _i = r(5); }; - fail!(); + fail2!(); } diff --git a/src/test/run-fail/rt-set-exit-status.rs b/src/test/run-fail/rt-set-exit-status.rs index 4f71cdc67e9..4dc1386d850 100644 --- a/src/test/run-fail/rt-set-exit-status.rs +++ b/src/test/run-fail/rt-set-exit-status.rs @@ -13,7 +13,7 @@ use std::os; fn main() { - error!(~"whatever"); + error2!("whatever"); // 101 is the code the runtime uses on task failure and the value // compiletest expects run-fail tests to return. os::set_exit_status(101); diff --git a/src/test/run-fail/run-unexported-tests.rs b/src/test/run-fail/run-unexported-tests.rs index e9d3c41faa6..622e2e326e5 100644 --- a/src/test/run-fail/run-unexported-tests.rs +++ b/src/test/run-fail/run-unexported-tests.rs @@ -17,5 +17,5 @@ mod m { pub fn exported() { } #[test] - fn unexported() { fail!("runned an unexported test"); } + fn unexported() { fail2!("runned an unexported test"); } } diff --git a/src/test/run-fail/small-negative-indexing.rs b/src/test/run-fail/small-negative-indexing.rs index ee58f76fc99..a016af24451 100644 --- a/src/test/run-fail/small-negative-indexing.rs +++ b/src/test/run-fail/small-negative-indexing.rs @@ -15,5 +15,5 @@ use std::vec; fn main() { let v = vec::from_fn(1024u, {|n| n}); // this should trip a bounds check - error!(v[-1i8]); + error2!("{:?}", v[-1i8]); } diff --git a/src/test/run-fail/spawnfail.rs b/src/test/run-fail/spawnfail.rs index 122ea901805..dad8ead8d65 100644 --- a/src/test/run-fail/spawnfail.rs +++ b/src/test/run-fail/spawnfail.rs @@ -17,7 +17,7 @@ use std::task; // We don't want to see any invalid reads fn main() { fn f() { - fail!(); + fail2!(); } task::spawn(|| f() ); } diff --git a/src/test/run-fail/task-comm-recv-block.rs b/src/test/run-fail/task-comm-recv-block.rs index fb2d90e99cf..840db545dec 100644 --- a/src/test/run-fail/task-comm-recv-block.rs +++ b/src/test/run-fail/task-comm-recv-block.rs @@ -16,7 +16,7 @@ use std::task; fn goodfail() { task::deschedule(); - fail!("goodfail"); + fail2!("goodfail"); } fn main() { @@ -25,5 +25,5 @@ fn main() { // We shouldn't be able to get past this recv since there's no // message available let i: int = po.recv(); - fail!("badfail"); + fail2!("badfail"); } diff --git a/src/test/run-fail/tls-exit-status.rs b/src/test/run-fail/tls-exit-status.rs index 1858ceb2836..419d8c1320f 100644 --- a/src/test/run-fail/tls-exit-status.rs +++ b/src/test/run-fail/tls-exit-status.rs @@ -15,5 +15,5 @@ use std::os; fn main() { os::args(); - fail!("please have a nonzero exit status"); + fail2!("please have a nonzero exit status"); } diff --git a/src/test/run-fail/unique-fail.rs b/src/test/run-fail/unique-fail.rs index 86fde5b7f97..d1d816f7f79 100644 --- a/src/test/run-fail/unique-fail.rs +++ b/src/test/run-fail/unique-fail.rs @@ -9,4 +9,4 @@ // except according to those terms. // error-pattern: fail -fn main() { ~fail!(); } +fn main() { ~fail2!(); } diff --git a/src/test/run-fail/unwind-box-fn-unique.rs b/src/test/run-fail/unwind-box-fn-unique.rs index 38a72353a1e..0050002a22e 100644 --- a/src/test/run-fail/unwind-box-fn-unique.rs +++ b/src/test/run-fail/unwind-box-fn-unique.rs @@ -11,14 +11,14 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { let y = ~0; let x: @~fn() = @(|| { - error!(y.clone()); + error2!("{:?}", y.clone()); }); failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box-res.rs b/src/test/run-fail/unwind-box-res.rs index c8a3e77a18c..02d2218f536 100644 --- a/src/test/run-fail/unwind-box-res.rs +++ b/src/test/run-fail/unwind-box-res.rs @@ -13,7 +13,7 @@ use std::cast; fn failfn() { - fail!(); + fail2!(); } struct r { @@ -41,6 +41,6 @@ fn main() { cast::forget(i1); let x = @r(i1p); failfn(); - error!(x); + error2!("{:?}", x); } } diff --git a/src/test/run-fail/unwind-box-str.rs b/src/test/run-fail/unwind-box-str.rs index 213220164f1..2086a23c6af 100644 --- a/src/test/run-fail/unwind-box-str.rs +++ b/src/test/run-fail/unwind-box-str.rs @@ -11,11 +11,11 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { let x = @~"hi"; failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box-trait.rs b/src/test/run-fail/unwind-box-trait.rs index 2ed3b39a445..b8534483fb5 100644 --- a/src/test/run-fail/unwind-box-trait.rs +++ b/src/test/run-fail/unwind-box-trait.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } trait i { @@ -25,5 +25,5 @@ impl i for ~int { fn main() { let x = @~0 as @i; failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box-unique-unique.rs b/src/test/run-fail/unwind-box-unique-unique.rs index 12b00f0c14b..3abf5330e40 100644 --- a/src/test/run-fail/unwind-box-unique-unique.rs +++ b/src/test/run-fail/unwind-box-unique-unique.rs @@ -11,11 +11,11 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { let x = @~~0; failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box-unique.rs b/src/test/run-fail/unwind-box-unique.rs index edc6ab9d984..5b3bf74f89e 100644 --- a/src/test/run-fail/unwind-box-unique.rs +++ b/src/test/run-fail/unwind-box-unique.rs @@ -11,11 +11,11 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { let x = @~0; failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box-vec.rs b/src/test/run-fail/unwind-box-vec.rs index 0a579a8dbbf..3b767839a0d 100644 --- a/src/test/run-fail/unwind-box-vec.rs +++ b/src/test/run-fail/unwind-box-vec.rs @@ -11,11 +11,11 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { let x = @~[0, 1, 2, 3, 4, 5]; failfn(); - error!(x); + error2!("{:?}", x); } diff --git a/src/test/run-fail/unwind-box.rs b/src/test/run-fail/unwind-box.rs index 21308945253..0b144b6c1ed 100644 --- a/src/test/run-fail/unwind-box.rs +++ b/src/test/run-fail/unwind-box.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/unwind-fail.rs b/src/test/run-fail/unwind-fail.rs index 4d4bc0d53eb..df6c2be860f 100644 --- a/src/test/run-fail/unwind-fail.rs +++ b/src/test/run-fail/unwind-fail.rs @@ -12,5 +12,5 @@ fn main() { @0; - fail!(); + fail2!(); } diff --git a/src/test/run-fail/unwind-initializer-indirect.rs b/src/test/run-fail/unwind-initializer-indirect.rs index fd1ab88ff96..8a71d1d3456 100644 --- a/src/test/run-fail/unwind-initializer-indirect.rs +++ b/src/test/run-fail/unwind-initializer-indirect.rs @@ -10,7 +10,7 @@ // error-pattern:fail -fn f() -> @int { fail!(); } +fn f() -> @int { fail2!(); } fn main() { let _a: @int = f(); diff --git a/src/test/run-fail/unwind-initializer.rs b/src/test/run-fail/unwind-initializer.rs index 0d1584f3dc8..a4161ad424b 100644 --- a/src/test/run-fail/unwind-initializer.rs +++ b/src/test/run-fail/unwind-initializer.rs @@ -12,6 +12,6 @@ fn main() { let _a: @int = { - fail!(); + fail2!(); }; } diff --git a/src/test/run-fail/unwind-interleaved.rs b/src/test/run-fail/unwind-interleaved.rs index 365204d5c9e..cfd8d555c2e 100644 --- a/src/test/run-fail/unwind-interleaved.rs +++ b/src/test/run-fail/unwind-interleaved.rs @@ -12,7 +12,7 @@ fn a() { } -fn b() { fail!(); } +fn b() { fail2!(); } fn main() { let _x = ~[0]; diff --git a/src/test/run-fail/unwind-iter.rs b/src/test/run-fail/unwind-iter.rs index 51c6cb3adf3..4c9125bde99 100644 --- a/src/test/run-fail/unwind-iter.rs +++ b/src/test/run-fail/unwind-iter.rs @@ -14,7 +14,7 @@ #[allow(unused_variable)]; fn x(it: &fn(int)) { - fail!(); + fail2!(); it(0); } diff --git a/src/test/run-fail/unwind-iter2.rs b/src/test/run-fail/unwind-iter2.rs index 17936df6959..11fbcfaff78 100644 --- a/src/test/run-fail/unwind-iter2.rs +++ b/src/test/run-fail/unwind-iter2.rs @@ -16,5 +16,5 @@ fn x(it: &fn(int)) { } fn main() { - x(|_x| fail!() ); + x(|_x| fail2!() ); } diff --git a/src/test/run-fail/unwind-lambda.rs b/src/test/run-fail/unwind-lambda.rs index 65d9fce5ff5..4857a38519c 100644 --- a/src/test/run-fail/unwind-lambda.rs +++ b/src/test/run-fail/unwind-lambda.rs @@ -22,7 +22,7 @@ fn main() { let cheese = cheese.clone(); let f: &fn() = || { let _chew = mush + cheese; - fail!("so yummy") + fail2!("so yummy") }; f(); }); diff --git a/src/test/run-fail/unwind-match.rs b/src/test/run-fail/unwind-match.rs index a9761017c73..c017ddc49f0 100644 --- a/src/test/run-fail/unwind-match.rs +++ b/src/test/run-fail/unwind-match.rs @@ -15,7 +15,7 @@ fn test_box() { } fn test_str() { let res = match false { true => { ~"happy" }, - _ => fail!("non-exhaustive match failure") }; + _ => fail2!("non-exhaustive match failure") }; assert_eq!(res, ~"happy"); } fn main() { diff --git a/src/test/run-fail/unwind-misc-1.rs b/src/test/run-fail/unwind-misc-1.rs index d215927c7d0..dc5e5a3b995 100644 --- a/src/test/run-fail/unwind-misc-1.rs +++ b/src/test/run-fail/unwind-misc-1.rs @@ -19,7 +19,7 @@ fn main() { arr.push(@~"key stuff"); map.insert(arr.clone(), arr + &[@~"value stuff"]); if arr.len() == 5 { - fail!(); + fail2!(); } } } diff --git a/src/test/run-fail/unwind-move.rs b/src/test/run-fail/unwind-move.rs index 8f1b34d17cd..626228cd225 100644 --- a/src/test/run-fail/unwind-move.rs +++ b/src/test/run-fail/unwind-move.rs @@ -10,7 +10,7 @@ // error-pattern:fail fn f(_a: @int) { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/unwind-nested.rs b/src/test/run-fail/unwind-nested.rs index f8a63be2e9a..ae543c9a88c 100644 --- a/src/test/run-fail/unwind-nested.rs +++ b/src/test/run-fail/unwind-nested.rs @@ -15,7 +15,7 @@ fn main() { { let _b = @0; { - fail!(); + fail2!(); } } } diff --git a/src/test/run-fail/unwind-partial-box.rs b/src/test/run-fail/unwind-partial-box.rs index 88f71a5ed7c..933bd62bc0c 100644 --- a/src/test/run-fail/unwind-partial-box.rs +++ b/src/test/run-fail/unwind-partial-box.rs @@ -10,7 +10,7 @@ // error-pattern:fail -fn f() -> ~[int] { fail!(); } +fn f() -> ~[int] { fail2!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. diff --git a/src/test/run-fail/unwind-partial-unique.rs b/src/test/run-fail/unwind-partial-unique.rs index e9bbbd46c03..b627103485c 100644 --- a/src/test/run-fail/unwind-partial-unique.rs +++ b/src/test/run-fail/unwind-partial-unique.rs @@ -10,7 +10,7 @@ // error-pattern:fail -fn f() -> ~[int] { fail!(); } +fn f() -> ~[int] { fail2!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. diff --git a/src/test/run-fail/unwind-partial-vec.rs b/src/test/run-fail/unwind-partial-vec.rs index 3d6d26937db..34898965906 100644 --- a/src/test/run-fail/unwind-partial-vec.rs +++ b/src/test/run-fail/unwind-partial-vec.rs @@ -10,7 +10,7 @@ // error-pattern:fail -fn f() -> ~[int] { fail!(); } +fn f() -> ~[int] { fail2!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. diff --git a/src/test/run-fail/unwind-rec.rs b/src/test/run-fail/unwind-rec.rs index 016654500b4..3858fe3923f 100644 --- a/src/test/run-fail/unwind-rec.rs +++ b/src/test/run-fail/unwind-rec.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn build() -> ~[int] { - fail!(); + fail2!(); } struct Blk { node: ~[int] } diff --git a/src/test/run-fail/unwind-rec2.rs b/src/test/run-fail/unwind-rec2.rs index 49a35181a8b..a5aaf46b4b2 100644 --- a/src/test/run-fail/unwind-rec2.rs +++ b/src/test/run-fail/unwind-rec2.rs @@ -15,7 +15,7 @@ fn build1() -> ~[int] { } fn build2() -> ~[int] { - fail!(); + fail2!(); } struct Blk { node: ~[int], span: ~[int] } diff --git a/src/test/run-fail/unwind-resource-fail.rs b/src/test/run-fail/unwind-resource-fail.rs index 6526455b8e2..5b991797969 100644 --- a/src/test/run-fail/unwind-resource-fail.rs +++ b/src/test/run-fail/unwind-resource-fail.rs @@ -15,7 +15,7 @@ struct r { } impl Drop for r { - fn drop(&mut self) { fail!("squirrel") } + fn drop(&mut self) { fail2!("squirrel") } } fn r(i: int) -> r { r { i: i } } diff --git a/src/test/run-fail/unwind-resource-fail2.rs b/src/test/run-fail/unwind-resource-fail2.rs index 67e1d0e8f92..652bf31dee4 100644 --- a/src/test/run-fail/unwind-resource-fail2.rs +++ b/src/test/run-fail/unwind-resource-fail2.rs @@ -16,7 +16,7 @@ struct r { } impl Drop for r { - fn drop(&mut self) { fail!("wombat") } + fn drop(&mut self) { fail2!("wombat") } } fn r(i: int) -> r { r { i: i } } @@ -24,5 +24,5 @@ fn r(i: int) -> r { r { i: i } } fn main() { @0; let r = r(0); - fail!(); + fail2!(); } diff --git a/src/test/run-fail/unwind-resource-fail3.rs b/src/test/run-fail/unwind-resource-fail3.rs index 231f6e7b7d5..92b10cef319 100644 --- a/src/test/run-fail/unwind-resource-fail3.rs +++ b/src/test/run-fail/unwind-resource-fail3.rs @@ -20,7 +20,7 @@ fn faily_box(i: @int) -> faily_box { faily_box { i: i } } #[unsafe_destructor] impl Drop for faily_box { fn drop(&mut self) { - fail!("quux"); + fail2!("quux"); } } diff --git a/src/test/run-fail/unwind-stacked.rs b/src/test/run-fail/unwind-stacked.rs index 8249807af74..ab28cb8a9ee 100644 --- a/src/test/run-fail/unwind-stacked.rs +++ b/src/test/run-fail/unwind-stacked.rs @@ -12,7 +12,7 @@ fn f() { let _a = @0; - fail!(); + fail2!(); } fn g() { diff --git a/src/test/run-fail/unwind-tup.rs b/src/test/run-fail/unwind-tup.rs index 15fa3ceed53..efb69b9f957 100644 --- a/src/test/run-fail/unwind-tup.rs +++ b/src/test/run-fail/unwind-tup.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn fold_local() -> @~[int]{ - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/unwind-tup2.rs b/src/test/run-fail/unwind-tup2.rs index 236ff817220..20d394bafac 100644 --- a/src/test/run-fail/unwind-tup2.rs +++ b/src/test/run-fail/unwind-tup2.rs @@ -15,7 +15,7 @@ fn fold_local() -> @~[int]{ } fn fold_remote() -> @~[int]{ - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/unwind-uninitialized.rs b/src/test/run-fail/unwind-uninitialized.rs index d5a06ffb903..d61a4927db8 100644 --- a/src/test/run-fail/unwind-uninitialized.rs +++ b/src/test/run-fail/unwind-uninitialized.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn f() { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/unwind-unique.rs b/src/test/run-fail/unwind-unique.rs index 53b2a55602c..9ede24d28c4 100644 --- a/src/test/run-fail/unwind-unique.rs +++ b/src/test/run-fail/unwind-unique.rs @@ -11,7 +11,7 @@ // error-pattern:fail fn failfn() { - fail!(); + fail2!(); } fn main() { diff --git a/src/test/run-fail/while-body-fails.rs b/src/test/run-fail/while-body-fails.rs index 32e1425b28c..c0a1033efe0 100644 --- a/src/test/run-fail/while-body-fails.rs +++ b/src/test/run-fail/while-body-fails.rs @@ -11,4 +11,4 @@ #[allow(while_true)]; // error-pattern:quux -fn main() { let _x: int = { while true { fail!("quux"); } ; 8 } ; } +fn main() { let _x: int = { while true { fail2!("quux"); } ; 8 } ; } diff --git a/src/test/run-fail/while-fail.rs b/src/test/run-fail/while-fail.rs index a0b437814fd..e42cb5e778c 100644 --- a/src/test/run-fail/while-fail.rs +++ b/src/test/run-fail/while-fail.rs @@ -12,5 +12,5 @@ // error-pattern:giraffe fn main() { - fail!({ while true { fail!("giraffe") }; "clandestine" }); + fail2!({ while true { fail2!("giraffe") }; "clandestine" }); } |
