about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
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/ext/tt
parent7e709bfd0dac1d5bbe5c97494980731b4d477e8f (diff)
downloadrust-af3b132285bc9314d545cae2e4eaef079a26252a.tar.gz
rust-af3b132285bc9314d545cae2e4eaef079a26252a.zip
syntax: Remove usage of fmt!
Diffstat (limited to 'src/libsyntax/ext/tt')
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs12
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index aa4183837e3..7db64feb809 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -122,7 +122,7 @@ pub struct MatcherPos {
 pub fn copy_up(mpu: &matcher_pos_up) -> ~MatcherPos {
     match *mpu {
       matcher_pos_up(Some(ref mp)) => (*mp).clone(),
-      _ => fail!()
+      _ => fail2!()
     }
 }
 
@@ -384,14 +384,14 @@ pub fn parse(
                 let nts = bb_eis.map(|ei| {
                     match ei.elts[ei.idx].node {
                       match_nonterminal(ref bind,ref name,_) => {
-                        fmt!("%s ('%s')", ident_to_str(name),
+                        format!("{} ('{}')", ident_to_str(name),
                              ident_to_str(bind))
                       }
-                      _ => fail!()
+                      _ => fail2!()
                     } }).connect(" or ");
-                return error(sp, fmt!(
+                return error(sp, format!(
                     "Local ambiguity: multiple parsing options: \
-                     built-in NTs %s or %u other options.",
+                     built-in NTs {} or {} other options.",
                     nts, next_eis.len()));
             } else if (bb_eis.len() == 0u && next_eis.len() == 0u) {
                 return failure(sp, ~"No rules expected the token: "
@@ -412,7 +412,7 @@ pub fn parse(
                         parse_nt(&rust_parser, ident_to_str(name))));
                     ei.idx += 1u;
                   }
-                  _ => fail!()
+                  _ => fail2!()
                 }
                 cur_eis.push(ei);
 
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 8a858f3d985..f8d48d00db9 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -117,7 +117,7 @@ fn lookup_cur_matched(r: &mut TtReader, name: Ident) -> @named_match {
     match r.interpolations.find_copy(&name) {
         Some(s) => lookup_cur_matched_by_matched(r, s),
         None => {
-            r.sp_diag.span_fatal(r.cur_span, fmt!("unknown macro variable `%s`",
+            r.sp_diag.span_fatal(r.cur_span, format!("unknown macro variable `{}`",
                                                   ident_to_str(&name)));
         }
     }
@@ -142,9 +142,9 @@ fn lockstep_iter_size(t: &token_tree, r: &mut TtReader) -> lis {
             lis_constraint(r_len, ref r_id) => {
                 let l_n = ident_to_str(l_id);
                 let r_n = ident_to_str(r_id);
-                lis_contradiction(fmt!("Inconsistent lockstep iteration: \
-                                       '%s' has %u items, but '%s' has %u",
-                                        l_n, l_len, r_n, r_len))
+                lis_contradiction(format!("Inconsistent lockstep iteration: \
+                                           '{}' has {} items, but '{}' has {}",
+                                           l_n, l_len, r_n, r_len))
             }
           }
         }
@@ -294,7 +294,7 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
               matched_seq(*) => {
                 r.sp_diag.span_fatal(
                     r.cur_span, /* blame the macro writer */
-                    fmt!("variable '%s' is still repeating at this depth",
+                    format!("variable '{}' is still repeating at this depth",
                          ident_to_str(&ident)));
               }
             }