syntax: Remove usage of fmt!

This commit is contained in:
Alex Crichton
2013-09-27 21:01:58 -07:00
parent 7e709bfd0d
commit af3b132285
34 changed files with 342 additions and 342 deletions

View File

@@ -423,7 +423,7 @@ pub fn expr_to_str(cx: @ExtCtxt, expr: @ast::Expr, err_msg: &str) -> @str {
pub fn check_zero_tts(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree],
name: &str) {
if tts.len() != 0 {
cx.span_fatal(sp, fmt!("%s takes no arguments", name));
cx.span_fatal(sp, format!("{} takes no arguments", name));
}
}
@@ -433,12 +433,12 @@ pub fn get_single_str_from_tts(cx: @ExtCtxt,
name: &str)
-> @str {
if tts.len() != 1 {
cx.span_fatal(sp, fmt!("%s takes 1 argument.", name));
cx.span_fatal(sp, format!("{} takes 1 argument.", name));
}
match tts[0] {
ast::tt_tok(_, token::LIT_STR(ident)) => cx.str_of(ident),
_ => cx.span_fatal(sp, fmt!("%s requires a string.", name)),
_ => cx.span_fatal(sp, format!("{} requires a string.", name)),
}
}
@@ -539,11 +539,11 @@ impl <K: Eq + Hash + IterBytes + 'static, V: 'static> MapChain<K,V>{
// names? I think not.
// delaying implementing this....
pub fn each_key (&self, _f: &fn (&K)->bool) {
fail!("unimplemented 2013-02-15T10:01");
fail2!("unimplemented 2013-02-15T10:01");
}
pub fn each_value (&self, _f: &fn (&V) -> bool) {
fail!("unimplemented 2013-02-15T10:02");
fail2!("unimplemented 2013-02-15T10:02");
}
// Returns a copy of the value that the name maps to.
@@ -586,7 +586,7 @@ impl <K: Eq + Hash + IterBytes + 'static, V: 'static> MapChain<K,V>{
if satisfies_pred(map,&n,pred) {
map.insert(key,ext);
} else {
fail!(~"expected map chain containing satisfying frame")
fail2!("expected map chain containing satisfying frame")
}
},
ConsMapChain (~ref mut map, rest) => {