diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-09-27 21:01:58 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-30 23:21:19 -0700 |
| commit | af3b132285bc9314d545cae2e4eaef079a26252a (patch) | |
| tree | 1c7116cb4d82388a6eb3da6e4088448ea24016ba /src/libsyntax/ext/tt/macro_parser.rs | |
| parent | 7e709bfd0dac1d5bbe5c97494980731b4d477e8f (diff) | |
| download | rust-af3b132285bc9314d545cae2e4eaef079a26252a.tar.gz rust-af3b132285bc9314d545cae2e4eaef079a26252a.zip | |
syntax: Remove usage of fmt!
Diffstat (limited to 'src/libsyntax/ext/tt/macro_parser.rs')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 12 |
1 files changed, 6 insertions, 6 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); |
