Skip to content

Commit 99df8a3

Browse files
committed
auto merge of #11463 : brson/rust/envcaps, r=huonw
Death to caps.
2 parents e19b1b1 + cdc4494 commit 99df8a3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/libsyntax/ext/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn expand_env(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
4343

4444
let (var, _var_str_style) = expr_to_str(cx, exprs[0], "expected string literal");
4545
let msg = match exprs.len() {
46-
1 => format!("Environment variable {} not defined", var).to_managed(),
46+
1 => format!("environment variable `{}` not defined", var).to_managed(),
4747
2 => {
4848
let (s, _style) = expr_to_str(cx, exprs[1], "expected string literal");
4949
s

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) {

src/test/compile-fail/extenv-not-defined-default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn main() { env!("__HOPEFULLY_NOT_DEFINED__"); } //~ ERROR: Environment variable __HOPEFULLY_NOT_DEFINED__ not defined
11+
fn main() { env!("__HOPEFULLY_NOT_DEFINED__"); } //~ ERROR: environment variable `__HOPEFULLY_NOT_DEFINED__` not defined

0 commit comments

Comments
 (0)