Skip to content

Commit cdc4494

Browse files
committed
syntax: Fix capitalization in macro_parser errors
1 parent 60e096a commit cdc4494

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libsyntax/ext/tt/macro_parser.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ pub fn parse(sess: @ParseSess,
351351
}
352352
return Success(nameize(sess, ms, v));
353353
} else if eof_eis.len() > 1u {
354-
return Error(sp, ~"Ambiguity: multiple successful parses");
354+
return Error(sp, ~"ambiguity: multiple successful parses");
355355
} else {
356-
return Failure(sp, ~"Unexpected end of macro invocation");
356+
return Failure(sp, ~"unexpected end of macro invocation");
357357
}
358358
} else {
359359
if (bb_eis.len() > 0u && next_eis.len() > 0u)
@@ -367,12 +367,12 @@ pub fn parse(sess: @ParseSess,
367367
_ => fail!()
368368
} }).connect(" or ");
369369
return Error(sp, format!(
370-
"Local ambiguity: multiple parsing options: \
370+
"local ambiguity: multiple parsing options: \
371371
built-in NTs {} or {} other options.",
372372
nts, next_eis.len()));
373373
} else if (bb_eis.len() == 0u && next_eis.len() == 0u) {
374-
return Failure(sp, ~"No rules expected the token: "
375-
+ to_str(get_ident_interner(), &tok));
374+
return Failure(sp, format!("no rules expected the token `{}`",
375+
to_str(get_ident_interner(), &tok)));
376376
} else if (next_eis.len() > 0u) {
377377
/* Now process the next token */
378378
while(next_eis.len() > 0u) {

0 commit comments

Comments
 (0)