Skip to content

Commit 60e096a

Browse files
committed
rustc: Fix formatting of env! error message
Death to caps.
1 parent f411b94 commit 60e096a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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/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)