rustc: Fix formatting of env! error message
Death to caps.
This commit is contained in:
parent
f411b94ce1
commit
60e096a43f
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue