]> git.lizzy.rs Git - rust.git/commitdiff
cfail: Remove usage of fmt!
authorAlex Crichton <alex@alexcrichton.com>
Mon, 30 Sep 2013 03:06:21 +0000 (20:06 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 1 Oct 2013 06:21:20 +0000 (23:21 -0700)
135 files changed:
src/test/compile-fail/assign-imm-local-twice.rs
src/test/compile-fail/assign-to-method.rs
src/test/compile-fail/autoderef-full-lval.rs
src/test/compile-fail/bad-bang-ann.rs
src/test/compile-fail/bad-const-type.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs
src/test/compile-fail/bind-by-move-no-guards.rs
src/test/compile-fail/bind-by-move-no-sub-bindings.rs
src/test/compile-fail/block-arg-as-stmt-with-value.rs
src/test/compile-fail/block-coerce-no.rs
src/test/compile-fail/bogus-tag.rs
src/test/compile-fail/borrowck-anon-fields-variant.rs
src/test/compile-fail/borrowck-assign-comp-idx.rs
src/test/compile-fail/borrowck-autoref-3261.rs
src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
src/test/compile-fail/borrowck-lend-flow-if.rs
src/test/compile-fail/borrowck-lend-flow-loop.rs
src/test/compile-fail/borrowck-lend-flow-match.rs
src/test/compile-fail/borrowck-lend-flow.rs
src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs
src/test/compile-fail/borrowck-move-out-of-vec-tail.rs
src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs
src/test/compile-fail/borrowck-ref-into-rvalue.rs
src/test/compile-fail/borrowck-vec-pattern-element-loan.rs
src/test/compile-fail/borrowck-vec-pattern-nesting.rs
src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs
src/test/compile-fail/class-cast-to-trait.rs
src/test/compile-fail/class-missing-self.rs
src/test/compile-fail/closure-that-fails.rs
src/test/compile-fail/copy-a-resource.rs
src/test/compile-fail/debug-correct-span.rs [deleted file]
src/test/compile-fail/deref-non-pointer.rs
src/test/compile-fail/die-not-static.rs [deleted file]
src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs
src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs
src/test/compile-fail/does-nothing.rs
src/test/compile-fail/export2.rs
src/test/compile-fail/extfmt-missing-type.rs
src/test/compile-fail/extfmt-no-args.rs
src/test/compile-fail/extfmt-non-literal.rs
src/test/compile-fail/extfmt-non-literal2.rs
src/test/compile-fail/extfmt-not-enough-args.rs
src/test/compile-fail/extfmt-too-many-args.rs
src/test/compile-fail/extfmt-unknown-type.rs
src/test/compile-fail/extfmt-unsigned-plus.rs
src/test/compile-fail/extfmt-unsigned-space.rs
src/test/compile-fail/extfmt-unterminated-conv.rs
src/test/compile-fail/fail-expr.rs
src/test/compile-fail/fail-simple.rs
src/test/compile-fail/fail-type-err.rs
src/test/compile-fail/functional-struct-update-noncopyable.rs
src/test/compile-fail/if-without-else-result.rs
src/test/compile-fail/import-glob-0.rs
src/test/compile-fail/import-glob-circular.rs
src/test/compile-fail/import.rs
src/test/compile-fail/import2.rs
src/test/compile-fail/import3.rs
src/test/compile-fail/import4.rs
src/test/compile-fail/issue-1448-2.rs
src/test/compile-fail/issue-1476.rs
src/test/compile-fail/issue-2149.rs
src/test/compile-fail/issue-2150.rs
src/test/compile-fail/issue-2151.rs
src/test/compile-fail/issue-2281-part1.rs
src/test/compile-fail/issue-2330.rs
src/test/compile-fail/issue-2370-2.rs
src/test/compile-fail/issue-2370.rs
src/test/compile-fail/issue-2611-4.rs
src/test/compile-fail/issue-2611-5.rs
src/test/compile-fail/issue-2823.rs
src/test/compile-fail/issue-3021.rs
src/test/compile-fail/issue-3038.rs
src/test/compile-fail/issue-3099.rs
src/test/compile-fail/issue-3521-2.rs
src/test/compile-fail/issue-3521.rs
src/test/compile-fail/issue-3601.rs
src/test/compile-fail/issue-3668.rs
src/test/compile-fail/issue-5062.rs
src/test/compile-fail/issue-5439.rs
src/test/compile-fail/issue-6458-1.rs
src/test/compile-fail/issue-6458-2.rs
src/test/compile-fail/lint-unused-unsafe.rs
src/test/compile-fail/liveness-and-init.rs
src/test/compile-fail/liveness-bad-bang-2.rs
src/test/compile-fail/liveness-block-unint.rs
src/test/compile-fail/liveness-break-uninit-2.rs
src/test/compile-fail/liveness-break-uninit.rs
src/test/compile-fail/liveness-closure-require-ret.rs
src/test/compile-fail/liveness-if-no-else.rs
src/test/compile-fail/liveness-if-with-else.rs
src/test/compile-fail/liveness-init-in-fn-expr.rs
src/test/compile-fail/liveness-move-in-loop.rs
src/test/compile-fail/liveness-move-in-while.rs
src/test/compile-fail/liveness-or-init.rs
src/test/compile-fail/liveness-uninit.rs
src/test/compile-fail/liveness-use-after-move.rs
src/test/compile-fail/liveness-use-after-send.rs
src/test/compile-fail/liveness-while-break.rs
src/test/compile-fail/match-join.rs
src/test/compile-fail/moves-based-on-type-exprs.rs
src/test/compile-fail/moves-based-on-type-match-bindings.rs
src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs
src/test/compile-fail/no-capture-arc.rs
src/test/compile-fail/no-reuse-move-arc.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/non-exhaustive-match-nested.rs
src/test/compile-fail/noncopyable-class.rs
src/test/compile-fail/nonscalar-cast.rs
src/test/compile-fail/not-enough-arguments.rs
src/test/compile-fail/oversized-literal.rs
src/test/compile-fail/packed-struct-generic-transmute.rs
src/test/compile-fail/packed-struct-transmute.rs
src/test/compile-fail/pattern-tyvar-2.rs
src/test/compile-fail/pattern-tyvar.rs
src/test/compile-fail/pinned-deep-copy.rs
src/test/compile-fail/regions-addr-of-self.rs
src/test/compile-fail/regions-fn-subtyping.rs
src/test/compile-fail/regions-free-region-ordering-callee.rs
src/test/compile-fail/regions-freevar.rs
src/test/compile-fail/regions-ret-borrowed-1.rs
src/test/compile-fail/regions-ret-borrowed.rs
src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
src/test/compile-fail/tag-type-args.rs
src/test/compile-fail/unconstrained-none.rs
src/test/compile-fail/unique-pinned-nocopy.rs
src/test/compile-fail/unique-vec-res.rs
src/test/compile-fail/unsupported-cast.rs
src/test/compile-fail/vec-field.rs
src/test/compile-fail/vec-res-add.rs

index 7eeaa9435deff1e5d78df15a676eec5c427434eb..f60b67cf8420f037d4eb94b7de4f875a6729eb72 100644 (file)
@@ -11,9 +11,9 @@
 fn test() {
     let v: int;
     v = 1; //~ NOTE prior assignment occurs here
-    info!("v=%d", v);
+    info2!("v={}", v);
     v = 2; //~ ERROR re-assignment of immutable variable
-    info!("v=%d", v);
+    info2!("v={}", v);
 }
 
 fn main() {
index f300bd51b24eca1582df34ca467bfdaf8e6e1242..32f27f64f54d596a57d56b3a7317ef70a05e90ca 100644 (file)
@@ -27,5 +27,5 @@ fn cat(in_x : uint, in_y : int) -> cat {
 
 fn main() {
   let nyan : cat = cat(52u, 99);
-  nyan.speak = || info!("meow"); //~ ERROR attempted to take value of method
+  nyan.speak = || info2!("meow"); //~ ERROR attempted to take value of method
 }
index e1ad19e32bddc7e553d01c434a1b792094123685..ae911b54107908ad8db90dfc314858ff6e805586 100644 (file)
@@ -21,11 +21,11 @@ fn main() {
     let a: clam = clam{x: @1, y: @2};
     let b: clam = clam{x: @10, y: @20};
     let z: int = a.x + b.y; //~ ERROR binary operation + cannot be applied to type `@int`
-    info!(z);
+    info2!("{:?}", z);
     assert_eq!(z, 21);
     let forty: fish = fish{a: @40};
     let two: fish = fish{a: @2};
     let answer: int = forty.a + two.a;  //~ ERROR binary operation + cannot be applied to type `@int`
-    info!(answer);
+    info2!("{:?}", answer);
     assert_eq!(answer, 42);
 }
index 2ffb5dd29066f37f712f0c54823627e19a2dd4a9..a9e9ed64d9a37375f3b46ab04feb266eda4dfdd1 100644 (file)
@@ -12,7 +12,7 @@
 // Tests that a function with a ! annotation always actually fails
 
 fn bad_bang(i: uint) -> ! {
-    if i < 0u { } else { fail!(); }
+    if i < 0u { } else { fail2!(); }
     //~^ ERROR expected `!` but found `()`
 }
 
index 5045c87c2f3a80b2bb229164ec3a95d21b831986..095a85ab21e96c05c1056b67abf6627d044e4c63 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:expected `~str` but found `int`
 
 static i: ~str = 10i;
-fn main() { info!(i); }
+fn main() { info2!("{:?}", i); }
index 3d1cca46085dbf06f8d9f95a890360b85d309391..262248f9dc3b795691610c6a5dd79407d152f5ad 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: () }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("destructor runs");
+        error2!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some(X { x: () });
     match x {
         Some(ref _y @ _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail!()
+        None => fail2!()
     }
 }
index a1803a621a53fc2996f4ddea13508ddcc58a5d0d..bf665e6fb60b28eb43422e9435d4a4a66ba50a82 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("destructor runs");
+        error2!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some((X { x: () }, X { x: () }));
     match x {
         Some((ref _y, _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail!()
+        None => fail2!()
     }
 }
index 34a9c0b8fc26d01fdcdbcc6ead782b013377ef62..fcb9dbb300c82e3aca02689fcd55ec18c7937cd0 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("destructor runs");
+        error2!("destructor runs");
     }
 }
 
@@ -22,6 +22,6 @@ fn main() {
     let x = some2(X { x: () }, X { x: () });
     match x {
         some2(ref _y, _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        none2 => fail!()
+        none2 => fail2!()
     }
 }
index 2aa3379993b7abaf195f247baa57c9707d592a04..19076181c512293253c49a5bb02fae3d83bf0bfb 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("destructor runs");
+        error2!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some((X { x: () }, X { x: () }));
     match x {
         Some((_y, ref _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail!()
+        None => fail2!()
     }
 }
index 348781d74977e79710b52ee6563fd2d088f4f233..5c0274b03d09a76ad806977c6ec0225b4bdf5328 100644 (file)
@@ -15,8 +15,8 @@ fn main() {
     let x = Some(p);
     c.send(false);
     match x {
-        Some(z) if z.recv() => { fail!() }, //~ ERROR cannot bind by-move into a pattern guard
+        Some(z) if z.recv() => { fail2!() }, //~ ERROR cannot bind by-move into a pattern guard
         Some(z) => { assert!(!z.recv()); },
-        None => fail!()
+        None => fail2!()
     }
 }
index 7143ce0252b733c4b5683f3d2453fe753d16a317..9b7cc41e5c875729b7028f4febd5632c247b1e48 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("destructor runs");
+        error2!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some(X { x: () });
     match x {
         Some(_y @ ref _z) => { }, //~ ERROR cannot bind by-move with sub-bindings
-        None => fail!()
+        None => fail2!()
     }
 }
index d2366c2b5bc5d25819e25c59fb4524ad460efcb5..294c45093dd6ff110417ab07b4ae03e718f67498 100644 (file)
@@ -17,6 +17,6 @@ fn compute1() -> float {
 
 fn main() {
     let x = compute1();
-    info!(x);
+    info2!("{:?}", x);
     assert_eq!(x, -4f);
 }
index df9eb9fdda69b863dc4638e7e76526f806a554fd..379b71f741173e7179de1ff18740e1559ac6a912 100644 (file)
@@ -21,6 +21,6 @@ fn fn_id(f: extern fn()) -> extern fn() { return f }
 
 fn main() {
     let i = 8;
-    let f = coerce(|| error!(i) );
+    let f = coerce(|| error2!("{:?}", i) );
     f();
 }
index 63d12b72cc6353c1fcd8e2d4a404751d0bb12d36..c14989fcbbb6c8a9179af97aca11a6e51723db98 100644 (file)
@@ -17,7 +17,7 @@ enum color { rgb(int, int, int), rgba(int, int, int, int), }
 fn main() {
     let red: color = rgb(255, 0, 0);
     match red {
-      rgb(r, g, b) => { info!("rgb"); }
-      hsl(h, s, l) => { info!("hsl"); }
+      rgb(r, g, b) => { info2!("rgb"); }
+      hsl(h, s, l) => { info2!("hsl"); }
     }
 }
index da0a9323d2c8178da4b8cff2cf4db54e790596c8..ce3aff59d7a63470bff7c85c2120cab99613ad87 100644 (file)
@@ -10,12 +10,12 @@ fn distinct_variant() {
 
     let a = match y {
       Y(ref mut a, _) => a,
-      X => fail!()
+      X => fail2!()
     };
 
     let b = match y {
       Y(_, ref mut b) => b,
-      X => fail!()
+      X => fail2!()
     };
 
     *a += 1;
@@ -27,12 +27,12 @@ fn same_variant() {
 
     let a = match y {
       Y(ref mut a, _) => a,
-      X => fail!()
+      X => fail2!()
     };
 
     let b = match y {
       Y(ref mut b, _) => b, //~ ERROR cannot borrow
-      X => fail!()
+      X => fail2!()
     };
 
     *a += 1;
index 0256c88b01d5d20a7509a287576c4a9c9cae7bc8..8c4d681d9835dba2c3ca03e1e0300e279fff3efb 100644 (file)
@@ -21,7 +21,7 @@ fn a() {
 
     p[0] = 5; //~ ERROR cannot assign
 
-    info!("%d", *q);
+    info2!("{}", *q);
 }
 
 fn borrow(_x: &[int], _f: &fn()) {}
index 4bbd1b0decf57c8b3f222bf80669e30564b0f0b4..487a16c1836d17c51a6951ba56d6936c71bd63a6 100644 (file)
@@ -24,7 +24,7 @@ fn main() {
                 x = X(Left((0,0))); //~ ERROR cannot assign to `x`
                 (*f)()
             },
-            _ => fail!()
+            _ => fail2!()
         }
     }
 }
index 1051c5829ec387cd9e5957a6b48e8f042a13bdec..c7cb9ce27f2bb02e28197352a23acb15403d8a57 100644 (file)
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> ~Foo { fail!() }
+fn make_foo() -> ~Foo { fail2!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();
index cdcf50c906e3655234f3a9cdd276d505a8e99355..d01fd86f2886ae9885012c35391951e5c146cb58 100644 (file)
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> Foo { fail!() }
+fn make_foo() -> Foo { fail2!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();
index 1c725a0dd0e036ba6f6e6823c90ded1e54f5da89..918e06fad07d4a59610b2f1db81f4ae685b1c90c 100644 (file)
@@ -16,7 +16,7 @@ struct defer<'self> {
 impl<'self> Drop for defer<'self> {
     fn drop(&mut self) {
         unsafe {
-            error!("%?", self.x);
+            error2!("{:?}", self.x);
         }
     }
 }
index 563f63b98be05528580535b642cbc6bc77fd11f6..1058211a6e455e3a3276cad3e63722ee87e728a7 100644 (file)
@@ -16,9 +16,9 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail!() }
-fn for_func(_f: &fn() -> bool) { fail!() }
-fn produce<T>() -> T { fail!(); }
+fn cond() -> bool { fail2!() }
+fn for_func(_f: &fn() -> bool) { fail2!() }
+fn produce<T>() -> T { fail2!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index 869ef0591e4bee2a69540ac7256fa5513489e1dc..fff8a25847972b4a3bed9af1dda8774c76356f2f 100644 (file)
@@ -16,8 +16,8 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail!() }
-fn produce<T>() -> T { fail!(); }
+fn cond() -> bool { fail2!() }
+fn produce<T>() -> T { fail2!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index d5c5597e57fce15f3d0794bd44e92e6872b51b27..b6a30da46f830ffe02eb31d4b265e3184d7d21f2 100644 (file)
@@ -13,7 +13,7 @@
 #[allow(unused_variable)];
 #[allow(dead_assignment)];
 
-fn cond() -> bool { fail!() }
+fn cond() -> bool { fail2!() }
 fn link<'a>(v: &'a uint, w: &mut &'a uint) -> bool { *w = v; true }
 
 fn separate_arms() {
index ea840a28b4e6ac97efd6fe7ebb3af8bbcbe691a9..c51d6117e5ca146bd691478579bc4ff2e7f50f40 100644 (file)
@@ -16,9 +16,9 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail!() }
-fn for_func(_f: &fn() -> bool) { fail!() }
-fn produce<T>() -> T { fail!(); }
+fn cond() -> bool { fail2!() }
+fn for_func(_f: &fn() -> bool) { fail2!() }
+fn produce<T>() -> T { fail2!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index 87ab36348c6a659f048e4be731f2e1a58e8d15db..32dfa59927f5134070f423931f5b2ea291a8fb75 100644 (file)
@@ -18,14 +18,14 @@ fn box_imm() {
     let v = ~3;
     let _w = &v;
     do task::spawn {
-        info!("v=%d", *v);
+        info2!("v={}", *v);
         //~^ ERROR cannot move `v` into closure
     }
 
     let v = ~3;
     let _w = &v;
     task::spawn(|| {
-        info!("v=%d", *v);
+        info2!("v={}", *v);
         //~^ ERROR cannot move
     });
 }
index 01ca3cd1c282f457aa7427f88c1a2aa7dfa5e3e3..db9d8d7ceafba924094d0591b1c4634db6990da6 100644 (file)
@@ -16,7 +16,7 @@ fn f(x: &mut Either<int,float>, y: &Either<int,float>) -> int {
                 *x = Right(1.0);
                 *z
             }
-            _ => fail!()
+            _ => fail2!()
         }
     }
 
index ef37f9b1bb2077f035e4354fadaa3df019d53e0a..145aaa405a6e89a3580eafb35ea11cb9c70f76ba 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
                 }
             }
             let z = tail[0].clone();
-            info!(fmt!("%?", z));
+            info2!("{:?}", z);
         }
         _ => {
             unreachable!();
index f69036ff9d9136aee2c03c44185c7bda2befac46..56e047e5bc52253cd5c0cba5249454b16bb1c394 100644 (file)
@@ -12,5 +12,5 @@ fn main() {
     let x: int = 3;
     let y: &mut int = &mut x; //~ ERROR cannot borrow
     *y = 5;
-    info!(*y);
+    info2!("{:?}", *y);
 }
index cb56e929754da1ccf77669eb819f65065e54372b..bd0b4afe730c901317cbfe98a08e80095cf1b9e9 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
         Some(ref m) => { //~ ERROR borrowed value does not live long enough
             msg = m;
         },
-        None => { fail!() }
+        None => { fail2!() }
     }
     println(*msg);
 }
index ca20d68e4cdcbde130e1e448ab4ef9cec03edeab..53e69fc1611aa911d2359b08634d5e7ebbb349cb 100644 (file)
@@ -2,7 +2,7 @@ fn a() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let tail = match vec {
         [_, ..tail] => tail, //~ ERROR does not live long enough
-        _ => fail!("a")
+        _ => fail2!("a")
     };
     tail
 }
@@ -11,7 +11,7 @@ fn b() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let init = match vec {
         [..init, _] => init, //~ ERROR does not live long enough
-        _ => fail!("b")
+        _ => fail2!("b")
     };
     init
 }
@@ -20,7 +20,7 @@ fn c() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let slice = match vec {
         [_, ..slice, _] => slice, //~ ERROR does not live long enough
-        _ => fail!("c")
+        _ => fail2!("c")
     };
     slice
 }
index 02ba1b9d2fffb634f41b8336a5aedfc7bbccfe71..b31e49bceb505087f54b4c546e916a341c7e4ee1 100644 (file)
@@ -4,7 +4,7 @@ fn a() {
         [~ref _a] => {
             vec[0] = ~4; //~ ERROR cannot assign to `(*vec)[]` because it is borrowed
         }
-        _ => fail!("foo")
+        _ => fail2!("foo")
     }
 }
 
index e542238d035665c2b56f238f167877663d939223..e0c2d08e413399f3c17535e461b93b6625ba3b16 100644 (file)
@@ -2,7 +2,7 @@ fn a() -> &int {
     let vec = ~[1, 2, 3, 4];
     let tail = match vec {
         [_a, ..tail] => &tail[0], //~ ERROR borrowed value does not live long enough
-        _ => fail!("foo")
+        _ => fail2!("foo")
     };
     tail
 }
index 0d1582bf85713b654dc3c68efa5cbb5d58cce8b6..6f483b82d818336eb05ae22770f98e495e7509ed 100644 (file)
@@ -22,12 +22,12 @@ struct cat {
 impl cat {
   pub fn eat(&self) -> bool {
     if self.how_hungry > 0 {
-        error!("OM NOM NOM");
+        error2!("OM NOM NOM");
         self.how_hungry -= 2;
         return true;
     }
     else {
-        error!("Not hungry!");
+        error2!("Not hungry!");
         return false;
     }
   }
@@ -40,7 +40,7 @@ impl noisy for cat {
 
 impl cat {
     fn meow(&self) {
-      error!("Meow");
+      error2!("Meow");
       self.meows += 1;
       if self.meows % 5 == 0 {
           self.how_hungry += 1;
index c27c27b5942e1b3276e86c410a94a21883c57b8b..101f96ce0b47cb4ebfabc474dc2f4944edb23d2a 100644 (file)
@@ -15,7 +15,7 @@ struct cat {
 impl cat {
     fn sleep(&self) { loop{} }
     fn meow(&self) {
-      error!("Meow");
+      error2!("Meow");
       meows += 1u; //~ ERROR unresolved name
       sleep();     //~ ERROR unresolved name
     }
index aad0e8bcbb6dd874fa5ead459190574cdcfeb112..6663cff9b5632141677db824f2948346c498bf5e 100644 (file)
@@ -2,6 +2,6 @@ fn foo(f: &fn() -> !) {}
 
 fn main() {
     // Type inference didn't use to be able to handle this:
-    foo(|| fail!());
+    foo(|| fail2!());
     foo(|| 22); //~ ERROR mismatched types
 }
index c5f5861de825d778395d9a6d85b9f090af2edb4d..771f2b2dfb680454225c813db095076088f225c1 100644 (file)
@@ -26,5 +26,5 @@ fn main() {
     let x = foo(10);
     let _y = x.clone();
     //~^ ERROR does not implement any method in scope
-    error!(x);
+    error2!("{:?}", x);
 }
diff --git a/src/test/compile-fail/debug-correct-span.rs b/src/test/compile-fail/debug-correct-span.rs
deleted file mode 100644 (file)
index f143e6c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    debug!("%s %s", 3); //~ ERROR: not enough arguments
-}
index 7b1b0f6243ac4321b22ebd7470b7d8be4441979e..86c56f7ae8190a1105dece47fcc5da8b50436833 100644 (file)
@@ -10,6 +10,6 @@
 
 fn main() {
   match *1 { //~ ERROR: cannot be dereferenced
-      _ => { fail!(); }
+      _ => { fail2!(); }
   }
 }
diff --git a/src/test/compile-fail/die-not-static.rs b/src/test/compile-fail/die-not-static.rs
deleted file mode 100644 (file)
index 40a4232..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-use std::str;
-
-fn main() {
-    let v = ~"test";
-    let sslice = v.slice(0, v.len());
-    //~^ ERROR borrowed value does not live long enough
-    fail!(sslice);
-}
index 2a4d46941b9771312b1f37dd2f60821d4573c7b1..aac6cd118b204884ce23647a8f070c12d8fe89ad 100644 (file)
@@ -14,7 +14,7 @@ struct X {
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("value: %s", self.x);
+        error2!("value: {}", self.x);
     }
 }
 
@@ -26,5 +26,5 @@ fn unwrap(x: X) -> ~str {
 fn main() {
     let x = X { x: ~"hello" };
     let y = unwrap(x);
-    error!("contents: %s", y);
+    error2!("contents: {}", y);
 }
index ecb02c4307d3e1427a14952577eb827e5e755118..e14900c4bb44cb0553aa5018691dc3a197eafcff 100644 (file)
@@ -14,7 +14,7 @@ struct X {
 
 impl Drop for X {
     fn drop(&mut self) {
-        error!("value: %s", self.x);
+        error2!("value: {}", self.x);
     }
 }
 
@@ -22,7 +22,7 @@ fn main() {
     let x = X { x: ~"hello" };
 
     match x {
-        X { x: y } => error!("contents: %s", y)
+        X { x: y } => error2!("contents: {}", y)
         //~^ ERROR cannot move out of type `X`, which defines the `Drop` trait
     }
 }
index 9d2b68ddb81ef6ce2cd712ac3160e3941998c7c2..dc32e8e10226cc5601a132c9ed577cfc965b1e31 100644 (file)
@@ -1,2 +1,2 @@
 // error-pattern: unresolved name `this_does_nothing_what_the`.
-fn main() { info!("doing"); this_does_nothing_what_the; info!("boing"); }
+fn main() { info2!("doing"); this_does_nothing_what_the; info2!("boing"); }
index 22762eb4a7eb514d54cbe8c37b38422abbce6ef8..3fdd4000b1b9ab383f6cf765231ad70474b90bfb 100644 (file)
@@ -15,7 +15,7 @@ mod foo {
 }
 
 mod bar {
-    fn x() { info!("x"); }
+    fn x() { info2!("x"); }
 
     pub fn y() { }
 }
index 012d761c0e6b14895de586522df9c07c33cb02dd..7602656eabb074b28a90fd34168539266fb39d2d 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:missing type
 
-fn main() { fmt!("%+"); }
+fn main() { oldfmt!("%+"); }
index cd9308e7b3f25f562b4261dd2a0e787657cae82e..2721c780ac6cf3e2a3bfaa8dc39a2964dada0cbf 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:fmt! takes at least 1 argument
 
-fn main() { fmt!(); }
+fn main() { oldfmt!(); }
index 12e9c641d541f454e8ed2dced2b021dfc0afc5e8..7aa744a11caac933b8cff947910e3eafc81bfcaa 100644 (file)
@@ -14,5 +14,5 @@ fn main() {
     // fmt!'s first argument must be a literal.  Hopefully this
     // restriction can be eased eventually to just require a
     // compile-time constant.
-    let x = fmt!("a" + "b");
+    let x = oldfmt!("a" + "b");
 }
index a38565844d0cc7c497cccf462af5d48f0b993a8a..e25eae821275f3a49cd4398a91218d66f4391890 100644 (file)
@@ -14,5 +14,5 @@ fn main() {
     // fmt!'s first argument must be a literal.  Hopefully this
     // restriction can be eased eventually to just require a
     // compile-time constant.
-    let x = fmt!(20);
+    let x = oldfmt!(20);
 }
index f18ae748ee07f9653f9cc855d10b6f14fd610b88..5fd17fe92c14579067f63eaaabf67a017f4d05c5 100644 (file)
@@ -12,4 +12,4 @@
 
 extern mod extra;
 
-fn main() { let s = fmt!("%s%s%s", "test", "test"); }
+fn main() { let s = oldfmt!("%s%s%s", "test", "test"); }
index 2a72dcf89889e191ece31392663b1688e19e72de..5e12543ce8f0e600f65e99623ee8999ef11cf6dc 100644 (file)
@@ -12,4 +12,4 @@
 
 extern mod extra;
 
-fn main() { let s = fmt!("%s", "test", "test"); }
+fn main() { let s = oldfmt!("%s", "test", "test"); }
index 80950232b9535c3382a1e28a706aa6efc0fbd904..94ded1c528fdbfe507c154b1336dd14110d5fe09 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:unknown type
 
-fn main() { fmt!("%w"); }
+fn main() { oldfmt!("%w"); }
index 652f5b74f809e571965bfae366464a99bc57bf2c..4e165153c0bdcad27dfda119540dde51e3938ada 100644 (file)
@@ -12,5 +12,5 @@
 
 fn main() {
     // Can't use a sign on unsigned conversions
-    fmt!("%+u", 10u);
+    oldfmt!("%+u", 10u);
 }
index afd6cbbe1f1f7503921fb6c1790365090e031c96..8396ecc25c16ec7ee341a8f3a4a73e4d09a7dce8 100644 (file)
@@ -12,5 +12,5 @@
 
 fn main() {
     // Can't use a space on unsigned conversions
-    fmt!("% u", 10u);
+    oldfmt!("% u", 10u);
 }
index 158a38ed1b55eddf2978855e5ba248ddde063590..373a10e99cfd0560473beb9355d93b9fbf4daa72 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:unterminated conversion
 
-fn main() { fmt!("%"); }
+fn main() { oldfmt!("%"); }
index 98270bdc583835e63d9b274d6dd1e3996cdac965..4dce462bd416d9304e999c85a36074be32386ed4 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for int
 
-fn main() { fail!(5); }
+fn main() { fail2!(5); }
index 7def16770a790d9e39f7f22f7982c3a38bdee63c..bcede4483c744bf06ff7bbc5106453450f2024de 100644 (file)
@@ -12,5 +12,5 @@
 
 // error-pattern:unexpected token
 fn main() {
-  fail!(@);
+  fail2!(@);
 }
index b6755249bcf98108dce766569262e59a522784ff..341f60eeedf8d57018579eb5f0272861bdb1cdf3 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for ~[int]
-fn main() { fail!(~[0i]); }
+fn main() { fail2!(~[0i]); }
index 7fccdba172353f5da5e8b9e0421e5713370e60fe..284787a817264a16b600fd8f06e4cd4a49dd07c0 100644 (file)
@@ -17,7 +17,7 @@
 struct A { y: Arc<int>, x: Arc<int> }
 
 impl Drop for A {
-    fn drop(&mut self) { println(fmt!("x=%?", self.x.get())); }
+    fn drop(&mut self) { println(format!("x={:?}", self.x.get())); }
 }
 fn main() {
     let a = A { y: Arc::new(1), x: Arc::new(2) };
index 8e3318f6945ac1a1fa0a289b0672cb3488cd6c7e..c5fb22c68210682388c10bfe8e9a993dd828121f 100644 (file)
@@ -12,5 +12,5 @@
 
 fn main() {
     let a = if true { true };
-    info!(a);
+    info2!("{:?}", a);
 }
index 805aace081d02e75b44376492912c808212c8947..0e920d137a85cb36f29e9f8c6e9c842539795374 100644 (file)
 use module_of_many_things::*;
 
 mod module_of_many_things {
-    pub fn f1() { info!("f1"); }
-    pub fn f2() { info!("f2"); }
-    fn f3() { info!("f3"); }
-    pub fn f4() { info!("f4"); }
+    pub fn f1() { info2!("f1"); }
+    pub fn f2() { info2!("f2"); }
+    fn f3() { info2!("f3"); }
+    pub fn f4() { info2!("f4"); }
 }
 
 
index 49ee1ad55c0caa6b33c35915d443b2b32607f05e..334ddbeceee6214008733d20a0a284183c43085d 100644 (file)
 
 mod circ1 {
     pub use circ2::f2;
-    pub fn f1() { info!("f1"); }
+    pub fn f1() { info2!("f1"); }
     pub fn common() -> uint { return 0u; }
 }
 
 mod circ2 {
     pub use circ1::f1;
-    pub fn f2() { info!("f2"); }
+    pub fn f2() { info2!("f2"); }
     pub fn common() -> uint { return 1u; }
 }
 
index 5177dc4e47570caa711ee236b52fed63724dddf0..129a4aece8f5e4172a696790347cf47062469b87 100644 (file)
@@ -12,6 +12,6 @@
 use zed::bar;
 use zed::baz;
 mod zed {
-    pub fn bar() { info!("bar"); }
+    pub fn bar() { info2!("bar"); }
 }
 fn main(args: ~[str]) { bar(); }
index e67a79130b1f9a6e0529088136cf7aa14a2166e7..8cebbdbc176fb176f621b7b94016497948175e3b 100644 (file)
@@ -13,6 +13,6 @@
 
 mod baz {}
 mod zed {
-    pub fn bar() { info!("bar3"); }
+    pub fn bar() { info2!("bar3"); }
 }
 fn main(args: ~[str]) { bar(); }
index 7a7f4f20aea07f1b4dc57eba1a17d144120c92df..f05a90acc9dd35bfb580f63c3dd9b62d04f2b5ae 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern: unresolved
 use main::bar;
 
-fn main(args: ~[str]) { info!("foo"); }
+fn main(args: ~[str]) { info2!("foo"); }
index 087842d78c709f6910011c49886675be479cf420..bcc93407ec15af88039e328af75487121d93f9cf 100644 (file)
@@ -13,4 +13,4 @@
 mod a { pub use b::foo; }
 mod b { pub use a::foo; }
 
-fn main(args: ~[str]) { info!("loop"); }
+fn main(args: ~[str]) { info2!("loop"); }
index ba0a2cbab50221dbeb077fbf63d3626a931f715a..bf419db39541f8c5d759792a07eb99b171b35c66 100644 (file)
@@ -10,6 +10,8 @@
 
 // Regression test for issue #1448 and #1386
 
+fn foo(a: uint) -> uint { a }
+
 fn main() {
-    info!("%u", 10i); //~ ERROR mismatched types
+    info2!("{:u}", foo(10i)); //~ ERROR mismatched types
 }
index f223cd428ec13a59b726c227ac0a100d1e2e31fd..5e1a69227e57d4f8cb4095ff51083d84792e08ab 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    error!(x); //~ ERROR unresolved name `x`.
+    error2!("{:?}", x); //~ ERROR unresolved name `x`.
 }
index dcb85d86706327cfb8fc1b7bf4348ca522e36e7c..3f393621fd9088f300971c66d9023f6978e64540 100644 (file)
@@ -14,7 +14,7 @@ trait vec_monad<A> {
 
 impl<A> vec_monad<A> for ~[A] {
     fn bind<B>(&self, f: &fn(A) -> ~[B]) {
-        let mut r = fail!();
+        let mut r = fail2!();
         for elt in self.iter() { r = r + f(*elt); }
         //~^ WARNING unreachable expression
         //~^^ ERROR the type of this value must be known
index 64344ab4277939605bdaea6b4c13063dab6fa0fd..1c4df25f353bf4c3dedd77a1af0f32d776e0711b 100644 (file)
@@ -13,7 +13,7 @@
 
 fn fail_len(v: ~[int]) -> uint {
     let mut i = 3;
-    fail!();
+    fail2!();
     for x in v.iter() { i += 1u; }
     //~^ ERROR: unreachable statement
     return i;
index 5559ba344ed17a44e61bc775f65e77413276e033..db02bb5e55b60535dc776189711419dccda0a9f6 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn main() {
-    let x = fail!();
+    let x = fail2!();
     x.clone(); //~ ERROR the type of this value must be known in this context
 }
index 0d94e378a4ca8a7226971bd18d3fd2aeba1b581c..b9b26e12b40fe658dd9f7eb46eeab55567b7428a 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern: unresolved name `foobar`.
 
-fn main(args: ~[str]) { info!(foobar); }
+fn main(args: ~[str]) { info2!("{:?}", foobar); }
index 6152e82294d1b51f9d0d4faa28506f0cf48117ae..c8f835ccdc9aad15ee28655eea97557c02d50f26 100644 (file)
@@ -16,7 +16,7 @@ trait channel<T> {
 
 // `chan` is not a trait, it's an enum
 impl chan for int { //~ ERROR chan is not a trait
-    fn send(&self, v: int) { fail!() }
+    fn send(&self, v: int) { fail2!() }
 }
 
 fn main() {
index 540089bd59dc3bfba52d94d0175d6a2b9d7bd84a..247ef3d751f4852453d0240e08e352f3d1ec9c59 100644 (file)
@@ -15,5 +15,5 @@ struct cat {
 
 fn main() {
     let kitty : cat = cat { x: () };
-    error!(*kitty);
+    error2!("{:?}", *kitty);
 }
index cd17cc2afaa0de2927a5e91c160d938e60bbf938..5754b4bb472e04b6f40afe6d0b891dac4dc4f066 100644 (file)
@@ -15,5 +15,5 @@ struct cat {
 
 fn main() {
     let nyan = cat { foo: () };
-    error!(*nyan);
+    error2!("{:?}", *nyan);
 }
index c62c28745253d157977417675c3758126fcdf2e8..77f07a9d793e28c0a5e47fcdb590e1dba281f38c 100644 (file)
@@ -20,7 +20,7 @@ struct E {
 }
 
 impl A for E {
-  fn b<F:Freeze,G>(_x: F) -> F { fail!() } //~ ERROR type parameter 0 requires `Freeze`
+  fn b<F:Freeze,G>(_x: F) -> F { fail2!() } //~ ERROR type parameter 0 requires `Freeze`
 }
 
 fn main() {}
index 9b8346da5c5d932dc2886938037bb32cbe931fb3..7dc6dd6a85208ce2c1d65de6c972c956c2984794 100644 (file)
@@ -21,7 +21,7 @@ struct E {
 
 impl A for E {
   // n.b. The error message is awful -- see #3404
-  fn b<F:Clone,G>(&self, _x: G) -> G { fail!() } //~ ERROR method `b` has an incompatible type
+  fn b<F:Clone,G>(&self, _x: G) -> G { fail2!() } //~ ERROR method `b` has an incompatible type
 }
 
 fn main() {}
index 58b216e8d119b8d3b78b83bedbcb31fd062debbc..49bc3b9ba6c3f3ed406390c346983f34fd257715 100644 (file)
@@ -14,7 +14,7 @@ struct C {
 
 impl Drop for C {
     fn drop(&mut self) {
-        error!("dropping: %?", self.x);
+        error2!("dropping: {:?}", self.x);
     }
 }
 
index 56ade814db0207bf60ff70c2a245ec00064e4365..f8e355360d709a370669465dde21043528a32f20 100644 (file)
@@ -25,7 +25,7 @@ fn reset(&self) {
            //~^ ERROR unresolved name `k0`.
         }
     }
-    fail!();
+    fail2!();
 }
 
 fn main() {}
index e16b9f933f79d1f79caa950224632ee87a19ed6b..3ab44b6674806b9ef80ec44a9e316df3bde1fc67 100644 (file)
@@ -19,13 +19,13 @@ fn main()
 {
 
     let _z = match g(1, 2) {
-      g(x, x) => { info!(x + x); }
+      g(x, x) => { info2!("{:?}", x + x); }
       //~^ ERROR Identifier `x` is bound more than once in the same pattern
     };
 
     let _z = match i(l(1, 2), m(3, 4)) {
       i(l(x, _), m(_, x))  //~ ERROR Identifier `x` is bound more than once in the same pattern
-        => { error!(x + x); }
+        => { error2!("{:?}", x + x); }
     };
 
     let _z = match (1, 2) {
index abc76b9da0fd7880cfbaf403f7c947494c25d8b6..d65001f2b041079086effac19874cefec30fa8e0 100644 (file)
@@ -9,13 +9,13 @@
 // except according to those terms.
 
 fn a(x: ~str) -> ~str {
-    fmt!("First function with %s", x)
+    format!("First function with {}", x)
 }
 
 fn a(x: ~str, y: ~str) -> ~str { //~ ERROR duplicate definition of value `a`
-    fmt!("Second function with %s and %s", x, y)
+    format!("Second function with {} and {}", x, y)
 }
 
 fn main() {
-    info!("Result: ");
+    info2!("Result: ");
 }
index 431f98d8181a05502519861290c76e8903a9748f..7c56064c2990a588dd1d2447d7eecb7f2ad27086 100644 (file)
@@ -13,5 +13,5 @@ fn main() {
 
     static y: int = foo + 1; //~ ERROR: attempt to use a non-constant value in a constant
 
-    error!(y);
+    error2!("{}", y);
 }
index d070a9735e48b4fc24956228a0bc9b39402f14ce..aa82ade449d1f2d7ae62b2d996b9dc1ace2ed603 100644 (file)
@@ -15,5 +15,5 @@ enum Stuff {
         Bar = foo //~ ERROR attempt to use a non-constant value in a constant
     }
 
-    error!(Bar);
+    error2!("{:?}", Bar);
 }
index c37c5a3e5afa58dbb06c08e66b4577e91bc8f0aa..4718c5b88a671b41391d17312566fc073e44fe1c 100644 (file)
@@ -37,6 +37,6 @@ fn main() {
         ~Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns
             ~HTMLImageElement(ref d) if d.image.is_some() => { true }
         },
-        _ => fail!("WAT") //~ ERROR unreachable pattern
+        _ => fail2!("WAT") //~ ERROR unreachable pattern
     };
 }
index 77e2e4f21e8a1aa32de28745ce203d2e553322f3..b6bfe79800f6758563e1a60813bdb7406d647f19 100644 (file)
@@ -16,7 +16,7 @@ trait PTrait {
 impl PTrait for P {
    fn getChildOption(&self) -> Option<@P> {
        static childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant
-       fail!();
+       fail2!();
    }
 }
 
index 26fb69f2cd0f8e46cebf35ef88d2b52ed1610ed3..8ff81df938d4e01d6d58fb153d95fe29f7893b7e 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn main() { fmt!("%?", None); } //~ ERROR unconstrained type
+fn main() { format!("{:?}", None); } //~ ERROR unconstrained type
index 8bd9bb326316e3fe52ca131bdb7077f26965e357..03fe86cb8797710bce299d67d1101bd1a8f92859 100644 (file)
@@ -25,5 +25,5 @@ fn make_foo (&self, i: int) -> ~Foo {
 fn main () {
     let bar = Bar { bar: 1 };
     let foo = bar.make_foo(2);
-    println(fmt!("%d", foo.foo));
+    println!("{}", foo.foo);
 }
index a54f05ec3480729d6820fde0fb5c96cfdafb7b08..77ff58e7427bb382ec21e716efba8e0f9a491e21 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn foo<T>(t: T) {}
-fn main() { foo(fail!()) } //~ ERROR cannot determine a type for this expression: unconstrained type
+fn main() { foo(fail2!()) } //~ ERROR cannot determine a type for this expression: unconstrained type
index 8621b37146ff309074673c89e597a7f433bd29d3..f395b7fdd76af9960c78bcd777a7642352f124a8 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    fmt!("%?", None); //~ ERROR: cannot determine a type for this expression: unconstrained type
+    format!("{:?}", None); //~ ERROR: cannot determine a type for this bounded
 }
index 6f0c2f1de1ab45b1bb7f4cf7992a2e1e329d2cb3..9deb7d6fba42b42467ff878969f1d44150402bad 100644 (file)
@@ -19,7 +19,7 @@ mod foo {
     }
 }
 
-fn callback<T>(_f: &fn() -> T) -> T { fail!() }
+fn callback<T>(_f: &fn() -> T) -> T { fail2!() }
 unsafe fn unsf() {}
 
 fn bad1() { unsafe {} }                  //~ ERROR: unnecessary `unsafe` block
@@ -49,7 +49,7 @@ fn good2() {
        sure that when purity is inherited that the source of the unsafe-ness
        is tracked correctly */
     unsafe {
-        unsafe fn what() -> ~[~str] { fail!() }
+        unsafe fn what() -> ~[~str] { fail2!() }
 
         do callback {
             what();
index 64618bb2f7a533409ddfef2580bf7382193ad41f..71d063130bf769a2c57b6db4e985d13b67313ccc 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let i: int;
 
-    info!(false && { i = 5; true });
-    info!(i); //~ ERROR use of possibly uninitialized variable: `i`
+    info2!("{}", false && { i = 5; true });
+    info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
 }
index e9ab87f09e26d0bfd2231d349aa854f0dfc4e2de..87cd83d8aeaf68e9f175171efb87e3032763322e 100644 (file)
@@ -12,6 +12,6 @@
 // Tests that a function with a ! annotation always actually fails
 // error-pattern: some control paths may return
 
-fn bad_bang(i: uint) -> ! { info!(3); }
+fn bad_bang(i: uint) -> ! { info2!("{}", 3); }
 
 fn main() { bad_bang(5u); }
index 159c945f3c21953f09d1fbe7c0e55515bc3270b3..9438aa0e52e8a3c3b080fa4647081f0bed7c7fbc 100644 (file)
@@ -12,6 +12,6 @@
 fn main() {
     let x: int;
     force(|| {
-        info!(x); //~ ERROR capture of possibly uninitialized variable: `x`
+        info2!("{}", x); //~ ERROR capture of possibly uninitialized variable: `x`
     });
 }
index 2c3004056eae076b3f482c17cfcd82d63a4ad964..37a91338d8d2e380ce33c9ede878050798fbc2dd 100644 (file)
@@ -16,9 +16,9 @@ fn foo() -> int {
         x = 0;
     }
 
-    info!(x); //~ ERROR use of possibly uninitialized variable: `x`
+    info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
 
     return 17;
 }
 
-fn main() { info!(foo()); }
+fn main() { info2!("{}", foo()); }
index 9e8a1e8a4d350511f07a4d28b3e8f41bf556c6ed..5aae93df0dcd5a8b167a43ae4cd6f21680258ceb 100644 (file)
@@ -16,9 +16,9 @@ fn foo() -> int {
         x = 0;
     }
 
-    info!(x); //~ ERROR use of possibly uninitialized variable: `x`
+    info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
 
     return 17;
 }
 
-fn main() { info!(foo()); }
+fn main() { info2!("{}", foo()); }
index f624bfe800f5fd71e61f2458a1e869b0242a343f..69aa47bd567ae4a8bbbd4429a0ad5f54ccefc5d7 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn force(f: &fn() -> int) -> int { f() }
-fn main() { info!(force(|| {})); } //~ ERROR mismatched types
+fn main() { info2!("{:?}", force(|| {})); } //~ ERROR mismatched types
index e9f831219e0c7dd14bbc3759efd8f1fdeff5ad1f..a0436d984167be7df2cf0058e87bc680ab203208 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info!(x); }
+fn foo(x: int) { info2!("{}", x); }
 
 fn main() {
     let x: int; if 1 > 2 { x = 10; }
index e2cf820f1911adbdf41cddf5a2a31f7f12ff3170..cf13f7117eea2796beea04cf7d3f2555f18f30ee 100644 (file)
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info!(x); }
+fn foo(x: int) { info2!("{:?}", x); }
 
 fn main() {
     let x: int;
     if 1 > 2 {
-        info!("whoops");
+        info2!("whoops");
     } else {
         x = 10;
     }
index b6c7895235b1009755f573ef98f536f1bffa223d..db8afdf45ae22d03fe2a2f1c37467e03f2473616 100644 (file)
@@ -13,5 +13,5 @@ fn main() {
         let i: int;
         i //~ ERROR use of possibly uninitialized variable: `i`
     };
-    error!(f());
+    error2!("{:?}", f());
 }
index b6cecf0145ce91c95089c245d22c051b36f1d66a..769de1e7ef3da5a89d1ef7c35a40171f14c320e5 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     let y: ~int = ~42;
     let mut x: ~int;
     loop {
-        info!(y);
+        info2!("{:?}", y);
         loop {
             loop {
                 loop {
index eed7ba16da4159e9607395834719c89cfc1027f7..752c6c9f1b7181862a14590c4fc05a2891f5f17a 100644 (file)
@@ -13,7 +13,7 @@ fn main() {
     let y: ~int = ~42;
     let mut x: ~int;
     loop {
-        info!(y); //~ ERROR use of moved value: `y`
+        info2!("{:?}", y); //~ ERROR use of moved value: `y`
         while true { while true { while true { x = y; x.clone(); } } }
         //~^ ERROR use of moved value: `y`
     }
index ee2a550d98370859ff16ad12c4f2d28d5301a896..9ab7a64e8bdf9d4f2a1649d5ea4b6cc67f8bacd4 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let i: int;
 
-    info!(false || { i = 5; true });
-    info!(i); //~ ERROR use of possibly uninitialized variable: `i`
+    info2!("{}", false || { i = 5; true });
+    info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
 }
index 015f824f6891b232877cf7db9cbfa2ac724c5d2c..439aff342bc61513b8afb57f808236bf5f39ea9e 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info!(x); }
+fn foo(x: int) { info2!("{}", x); }
 
 fn main() {
     let x: int;
index 3423c780c4aec1c26a4ed797d0318604c179270e..8ef3c5494aec671d05e68314cd6b2c310ddf1203 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let x = ~5;
     let y = x;
-    info!(*x); //~ ERROR use of moved value: `x`
+    info2!("{:?}", *x); //~ ERROR use of moved value: `x`
     y.clone();
 }
index 5a748fbc81c9ebb5565a1d9bfc3b95fc380f9666..4f2d84ad13b029b785134702fc598f9d5eb0866b 100644 (file)
@@ -9,9 +9,9 @@
 // except according to those terms.
 
 fn send<T:Send>(ch: _chan<T>, data: T) {
-    info!(ch);
-    info!(data);
-    fail!();
+    info2!("{:?}", ch);
+    info2!("{:?}", data);
+    fail2!();
 }
 
 struct _chan<T>(int);
@@ -20,7 +20,7 @@ fn send<T:Send>(ch: _chan<T>, data: T) {
 // message after the send deinitializes it
 fn test00_start(ch: _chan<~int>, message: ~int, _count: ~int) {
     send(ch, message);
-    info!(message); //~ ERROR use of moved value: `message`
+    info2!("{:?}", message); //~ ERROR use of moved value: `message`
 }
 
-fn main() { fail!(); }
+fn main() { fail2!(); }
index 712d586852af4b2582f16a93b11949624b683698..02d8656baff178b57e9c1bac5b3226064c7d6c0a 100644 (file)
@@ -14,7 +14,7 @@ fn test(cond: bool) {
         v = 3;
         break;
     }
-    info!("%d", v); //~ ERROR use of possibly uninitialized variable: `v`
+    info2!("{}", v); //~ ERROR use of possibly uninitialized variable: `v`
 }
 
 fn main() {
index 818671e1133222ab046bb78321f737f41fe2bba9..5d9ae958ce0c11f3e491b810e7572e4478bc90cd 100644 (file)
 // a good test that we merge paths correctly in the presence of a
 // variable that's used before it's declared
 
-fn my_fail() -> ! { fail!(); }
+fn my_fail() -> ! { fail2!(); }
 
 fn main() {
     match true { false => { my_fail(); } true => { } }
 
-    info!(x); //~ ERROR unresolved name `x`.
+    info2!("{:?}", x); //~ ERROR unresolved name `x`.
     let x: int;
 }
index fec0f89adbaf8a89f8bd08165619a3a2d918d7f8..6531ae035843ac9227abbe839ad1a87c87be75e8 100644 (file)
@@ -2,7 +2,7 @@
 // they occur as part of various kinds of expressions.
 
 struct Foo<A> { f: A }
-fn guard(_s: ~str) -> bool {fail!()}
+fn guard(_s: ~str) -> bool {fail2!()}
 fn touch<A>(_a: &A) {}
 
 fn f10() {
index 42944a206b360bb5d4bc2d6265dd7e766ec8fc2d..4893c8b71979b78f24b3b002cad9e2af353be2cc 100644 (file)
@@ -3,7 +3,7 @@
 // terms of the binding, not the discriminant.
 
 struct Foo<A> { f: A }
-fn guard(_s: ~str) -> bool {fail!()}
+fn guard(_s: ~str) -> bool {fail2!()}
 fn touch<A>(_a: &A) {}
 
 fn f10() {
index 2762140be3793c04fc2010aa596b6491d09b4dae..d1eae1ae6134b74a734a58ea2af5eb0e948b175c 100644 (file)
@@ -30,7 +30,7 @@ fn innocent_looking_victim() {
                     (f.c)(f, true);
                     println!("{:?}", msg);
                 },
-                None => fail!("oops"),
+                None => fail2!("oops"),
             }
         }
     }
index fd54b6638c65fece20d30d69ebb0e7006c4650df..90a68d796f3076e8ca91dd4a68d1b926a6c0447a 100644 (file)
@@ -26,5 +26,5 @@ fn main() {
 
     assert_eq!((arc_v.get())[2], 3);
 
-    info!(arc_v);
+    info2!("{:?}", arc_v);
 }
index a17196ae298e7022fc40faded5978a7d5d959f65..9eca1329824535e43e01e2f8abe8b10544d9e6df 100644 (file)
@@ -24,5 +24,5 @@ fn main() {
 
     assert_eq!((arc_v.get())[2], 3); //~ ERROR use of moved value: `arc_v`
 
-    info!(arc_v); //~ ERROR use of moved value: `arc_v`
+    info2!("{:?}", arc_v); //~ ERROR use of moved value: `arc_v`
 }
index e7b897ad9068383d6d0393235eda562ae8cb6348..f6d1aceab6469968bcc96d6dc4abcaf117ffb1c9 100644 (file)
@@ -33,6 +33,6 @@ fn foo(x: Port<()>) -> foo {
 
     do task::spawn {
         let y = x.take();   //~ ERROR does not fulfill `Send`
-        error!(y);
+        error2!("{:?}", y);
     }
 }
index b87b3c5245a8cbac80aa91f3e7f536fdaf949478..f5660fd35106c8cd4870eaabab4cedd0cb067a8a 100644 (file)
@@ -16,7 +16,7 @@ enum u { c, d }
 fn main() {
   let x = a(c);
   match x {
-      a(d) => { fail!("hello"); }
-      b => { fail!("goodbye"); }
+      a(d) => { fail2!("hello"); }
+      b => { fail2!("goodbye"); }
     }
 }
index 9d057998c790d73579736569725f2e199d71e388..199bdaa397adbc61e8c340ec3983008cbec48eda 100644 (file)
@@ -39,5 +39,5 @@ fn foo(i:int) -> foo {
 fn main() {
     let x = foo(10);
     let _y = x.clone(); //~ ERROR does not implement any method in scope
-    error!(x);
+    error2!("{:?}", x);
 }
index 9cfd63dd51fdbd20a54e8ce379b1f4bd63ea4d7f..45efa8929890a7b2f4d9be310929426dbdcac2c6 100644 (file)
@@ -15,5 +15,5 @@ struct foo {
 }
 
 fn main() {
-    info!(foo{ x: 1 } as int);
+    info2!("{:?}", foo{ x: 1 } as int);
 }
index 57eca3666ef14ef3dc363b4e1f8c32f719f26b58..a53736580d9b2aa53027227765c3f39547c84e1a 100644 (file)
@@ -13,7 +13,7 @@
 // unrelated errors.
 
 fn foo(a: int, b: int, c: int, d:int) {
-  fail!();
+  fail2!();
 }
 
 fn main() {
index f46ef0563164e8345a99ff791a6bf9340bf3959d..5b5cab25e0464126e6aee39828ca228e4fd01a3c 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:literal out of range
 
-fn main() { info!(300u8); }
+fn main() { info2!("{}", 300u8); }
index 8e15f11231e970b50f35a3ec2f6e051ff14def48..0a5bc4ad8bb851f7d7064a1f08adfbffd6ba9878 100644 (file)
@@ -32,6 +32,6 @@ fn main() {
     let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 };
     unsafe {
         let oof: Oof<[u8, .. 5], i32> = cast::transmute(foo);
-        info!(oof);
+        info2!("{:?}", oof);
     }
 }
index 38419b8df88a2c8992a6e994562929c44146ee7d..79978dedb567fb89b598f412e3ec79f95e21e857 100644 (file)
@@ -32,6 +32,6 @@ fn main() {
     let foo = Foo { bar: 1, baz: 10 };
     unsafe {
         let oof: Oof = cast::transmute(foo);
-        info!(oof);
+        info2!("{:?}", oof);
     }
 }
index 537d095d2d7a3d0a02b9e242a80e4e44be501e94..216280b34e922b98b9e2d3ba4fbeda8bef3b85d3 100644 (file)
@@ -15,6 +15,6 @@
 enum bar { t1((), Option<~[int]>), t2, }
 
 // n.b. my change changes this error message, but I think it's right -- tjc
-fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail!(); } } } //~ ERROR binary operation * cannot be applied to
+fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail2!(); } } } //~ ERROR binary operation * cannot be applied to
 
 fn main() { }
index 49ad8f87de33914e084426c3644e6495194c4f37..67a4bacbe9a9d9555155ea5afceca9227afbd0e3 100644 (file)
@@ -18,9 +18,9 @@ enum bar { t1((), Option<~[int]>), t2, }
 fn foo(t: bar) {
     match t {
       t1(_, Some::<int>(x)) => {
-        info!(x);
+        info2!("{:?}", x);
       }
-      _ => { fail!(); }
+      _ => { fail2!(); }
     }
 }
 
index 822c6812116346fa4ae6e27d112d785af71ef915..8baba6cccc11823d41de7bb74ab155e6c798f6e8 100644 (file)
@@ -37,7 +37,7 @@ fn main() {
         // Can't do this copy
         let x = ~~~A {y: r(i)};
         let _z = x.clone(); //~ ERROR failed to find an implementation
-        info!(x);
+        info2!("{:?}", x);
     }
-    error!(*i);
+    error2!("{:?}", *i);
 }
index 4565d897c72ba3199937d9e020a12274fe2cb922..1904f0826176ea25cd9f09ce779a0e04a449f1a3 100644 (file)
@@ -33,5 +33,5 @@ fn dog() -> dog {
 fn main() {
     let mut d = dog();
     d.chase_cat();
-    info!("cats_chased: %u", d.cats_chased);
+    info2!("cats_chased: {}", d.cats_chased);
 }
index 5928d31a66860479ad0b0523a4cb8e946c8cbf96..10107f64158d454ce3271ad3fbdffe8ffc31276d 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn of<T>() -> &fn(T) { fail!(); }
-fn subtype<T>(x: &fn(T)) { fail!(); }
+fn of<T>() -> &fn(T) { fail2!(); }
+fn subtype<T>(x: &fn(T)) { fail2!(); }
 
 fn test_fn<'x,'y,'z,T>(_x: &'x T, _y: &'y T, _z: &'z T) {
     // Here, x, y, and z are free.  Other letters
index 66ab4b7705433851896c2f167a315e05bac63d9e..872491adaacc849c44ee33991fa817d318576b62 100644 (file)
@@ -27,7 +27,7 @@ fn ordering3<'a, 'b>(x: &'a uint, y: &'b uint) -> &'a &'b uint {
     // Do not infer an ordering from the return value.
     let z: &'b uint = &*x;
     //~^ ERROR cannot infer an appropriate lifetime due to conflicting requirements
-    fail!();
+    fail2!();
 }
 
 fn ordering4<'a, 'b>(a: &'a uint, b: &'b uint, x: &fn(&'a &'b uint)) {
index 6bc93e3af7c742ee437ec3921882a3e7edca6a1b..06e91ddcf56debabc465b5542d25022c72520bb1 100644 (file)
@@ -13,6 +13,6 @@ fn wants_static_fn(_x: &'static fn()) {}
 fn main() {
     let i = 3;
     do wants_static_fn { //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements
-        info!("i=%d", i);
+        info2!("i={}", i);
     }
 }
index de4a05c9895c30144cd1811a78a4a4dd344ca9a4..885d50b7efc4c3823f77d7f22ae341845a9af609 100644 (file)
@@ -24,5 +24,5 @@ fn return_it<'a>() -> &'a int {
 
 fn main() {
     let x = return_it();
-    info!("foo=%d", *x);
+    info2!("foo={}", *x);
 }
index 1aa2329aaec6131d521e7f9e47dd335247cd90fb..5dea40f4ac7c96c9bcd82decd6117b2398ac2ef7 100644 (file)
@@ -27,5 +27,5 @@ fn return_it() -> &int {
 
 fn main() {
     let x = return_it();
-    info!("foo=%d", *x);
+    info2!("foo={}", *x);
 }
index ebd3320d901269871fee00554297ba856e05e229..ce6d12a22655e9cf7258b9dea657250e08d3a3b6 100644 (file)
@@ -16,7 +16,7 @@
 extern mod std;
 
 fn last<T>(v: ~[&T]) -> std::option::Option<T> {
-    fail!();
+    fail2!();
 }
 
 fn main() {
index f2ef1d1952505c09ba85aae43a1eda241b026277..a88435bff6eb0835d93f0bc77c7d4616e0a44aa6 100644 (file)
@@ -14,4 +14,4 @@ enum quux<T> { bar }
 
 fn foo(c: quux) { assert!((false)); }
 
-fn main() { fail!(); }
+fn main() { fail2!(); }
index 7993df80b8d1b6a3b4d317cf7be984822d65de39..798b92fd57b83a2e2e5880c53a0da9ca2f19539d 100644 (file)
@@ -11,5 +11,5 @@
 // Issue #5062
 
 fn main() {
-    fmt!("%?", None); //~ ERROR cannot determine a type for this expression: unconstrained type
+    None; //~ ERROR cannot determine a type for this expression: unconstrained type
 }
index 50bb074fc7ac7f09cbffb441a2e10a6ed7d19e7b..8882bd1e2681a19a957765d2b7e3cf90d9340972 100644 (file)
@@ -19,5 +19,5 @@ fn drop(&mut self) {}
 fn main() {
     let i = ~r { b: true };
     let _j = i.clone(); //~ ERROR failed to find an implementation
-    info!(i);
+    info2!("{:?}", i);
 }
index 0fcbc847850bebe7b640e6250516a57f6bc56f56..4bc181cbdfa978aa87970d7a0bbba110629565ee 100644 (file)
@@ -31,6 +31,6 @@ fn main() {
     let r2 = ~[~r { i: i2 }];
     f(r1.clone(), r2.clone());
     //~^ ERROR failed to find an implementation of
-    info!((r2, *i1));
-    info!((r1, *i2));
+    info2!("{:?}", (r2, *i1));
+    info2!("{:?}", (r1, *i2));
 }
index faa0069a1136ad35f6d4072e48e3f60ce53fa5fe..d9a5302aedcb9306121ef6d92b64993cf03e5f78 100644 (file)
@@ -13,5 +13,5 @@
 use std::libc;
 
 fn main() {
-  info!(1.0 as *libc::FILE); // Can't cast float to foreign.
+  info2!("{:?}", 1.0 as *libc::FILE); // Can't cast float to foreign.
 }
index bc2786b2c19a8bb015cd9424016897583c468de9..38bba1efea5748ec1ca6295192fc4b9aec4c1871 100644 (file)
@@ -13,7 +13,7 @@
 
 fn f() {
     let v = ~[1i];
-    info!(v.some_field_name); //type error
+    info2!("{}", v.some_field_name); //type error
 }
 
 fn main() { }
index e7441a2c9681800e59747f79b3e856ca19b93806..48db83bd92f3304ce209abb15e0f858090175a28 100644 (file)
@@ -25,5 +25,5 @@ fn main() {
     let i = ~[r(0)];
     let j = ~[r(1)];
     let k = i + j;
-    info!(j);
+    info2!("{}", j);
 }