summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-27 21:01:58 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-30 23:21:19 -0700
commitaf3b132285bc9314d545cae2e4eaef079a26252a (patch)
tree1c7116cb4d82388a6eb3da6e4088448ea24016ba /src/libsyntax/print/pprust.rs
parent7e709bfd0dac1d5bbe5c97494980731b4d477e8f (diff)
downloadrust-af3b132285bc9314d545cae2e4eaef079a26252a.tar.gz
rust-af3b132285bc9314d545cae2e4eaef079a26252a.zip
syntax: Remove usage of fmt!
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index dee8d710a73..bc1a4721207 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -453,10 +453,10 @@ pub fn print_type(s: @ps, ty: &ast::Ty) {
           word(s.s, ")");
       }
       ast::ty_mac(_) => {
-          fail!("print_type doesn't know how to print a ty_mac");
+          fail2!("print_type doesn't know how to print a ty_mac");
       }
       ast::ty_infer => {
-          fail!("print_type shouldn't see a ty_infer");
+          fail2!("print_type shouldn't see a ty_infer");
       }
 
     }
@@ -709,7 +709,7 @@ pub fn print_struct(s: @ps,
             popen(s);
             do commasep(s, inconsistent, struct_def.fields) |s, field| {
                 match field.node.kind {
-                    ast::named_field(*) => fail!("unexpected named field"),
+                    ast::named_field(*) => fail2!("unexpected named field"),
                     ast::unnamed_field => {
                         maybe_print_comment(s, field.span.lo);
                         print_type(s, &field.node.ty);
@@ -728,7 +728,7 @@ pub fn print_struct(s: @ps,
 
         for field in struct_def.fields.iter() {
             match field.node.kind {
-                ast::unnamed_field => fail!("unexpected unnamed field"),
+                ast::unnamed_field => fail2!("unexpected unnamed field"),
                 ast::named_field(ident, visibility) => {
                     hardbreak_if_not_bol(s);
                     maybe_print_comment(s, field.span.lo);
@@ -1017,7 +1017,7 @@ pub fn print_if(s: @ps, test: &ast::Expr, blk: &ast::Block,
               }
               // BLEAH, constraints would be great here
               _ => {
-                  fail!("print_if saw if with weird alternative");
+                  fail2!("print_if saw if with weird alternative");
               }
             }
           }
@@ -1042,7 +1042,7 @@ pub fn print_mac(s: @ps, m: &ast::mac) {
 
 pub fn print_vstore(s: @ps, t: ast::Vstore) {
     match t {
-        ast::VstoreFixed(Some(i)) => word(s.s, fmt!("%u", i)),
+        ast::VstoreFixed(Some(i)) => word(s.s, format!("{}", i)),
         ast::VstoreFixed(None) => word(s.s, "_"),
         ast::VstoreUniq => word(s.s, "~"),
         ast::VstoreBox => word(s.s, "@"),
@@ -1319,7 +1319,7 @@ pub fn print_expr(s: @ps, expr: &ast::Expr) {
                         }
                         end(s); // close enclosing cbox
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             } else {
                 // the block will close the pattern's ibox
@@ -2299,7 +2299,7 @@ mod test {
 
     fn string_check<T:Eq> (given : &T, expected: &T) {
         if !(given == expected) {
-            fail!("given %?, expected %?", given, expected);
+            fail2!("given {:?}, expected {:?}", given, expected);
         }
     }