auto merge of #11463 : brson/rust/envcaps, r=huonw

Death to caps.
This commit is contained in:
bors 2014-01-11 06:11:22 -08:00
commit 99df8a3f15
3 changed files with 7 additions and 7 deletions

View File

@ -43,7 +43,7 @@ pub fn expand_env(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
let (var, _var_str_style) = expr_to_str(cx, exprs[0], "expected string literal");
let msg = match exprs.len() {
1 => format!("Environment variable {} not defined", var).to_managed(),
1 => format!("environment variable `{}` not defined", var).to_managed(),
2 => {
let (s, _style) = expr_to_str(cx, exprs[1], "expected string literal");
s

View File

@ -351,9 +351,9 @@ pub fn parse(sess: @ParseSess,
}
return Success(nameize(sess, ms, v));
} else if eof_eis.len() > 1u {
return Error(sp, ~"Ambiguity: multiple successful parses");
return Error(sp, ~"ambiguity: multiple successful parses");
} else {
return Failure(sp, ~"Unexpected end of macro invocation");
return Failure(sp, ~"unexpected end of macro invocation");
}
} else {
if (bb_eis.len() > 0u && next_eis.len() > 0u)
@ -367,12 +367,12 @@ pub fn parse(sess: @ParseSess,
_ => fail!()
} }).connect(" or ");
return Error(sp, format!(
"Local ambiguity: multiple parsing options: \
"local ambiguity: multiple parsing 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: "
+ to_str(get_ident_interner(), &tok));
return Failure(sp, format!("no rules expected the token `{}`",
to_str(get_ident_interner(), &tok)));
} else if (next_eis.len() > 0u) {
/* Now process the next token */
while(next_eis.len() > 0u) {

View File

@ -8,4 +8,4 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() { env!("__HOPEFULLY_NOT_DEFINED__"); } //~ ERROR: Environment variable __HOPEFULLY_NOT_DEFINED__ not defined
fn main() { env!("__HOPEFULLY_NOT_DEFINED__"); } //~ ERROR: environment variable `__HOPEFULLY_NOT_DEFINED__` not defined