1
Fork 0

rustc: Fix formatting of env! error message

Death to caps.
This commit is contained in:
Brian Anderson 2014-01-10 17:55:53 -08:00
parent f411b94ce1
commit 60e096a43f
2 changed files with 2 additions and 2 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

@ -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