diff options
| author | bors <bors@rust-lang.org> | 2015-01-26 19:44:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-26 19:44:12 +0000 |
| commit | 8ec3a833d5082a77e74a30c2d3d353ba7f5df644 (patch) | |
| tree | c37ba2ade579e261fa37ecdc94e5d514de23f758 /src/libsyntax/ext | |
| parent | 16286f5cf921a9de463d8a744c33f49837698c3d (diff) | |
| parent | 0dac5685783631dc4ecf3e865229a3747fe81943 (diff) | |
| download | rust-8ec3a833d5082a77e74a30c2d3d353ba7f5df644.tar.gz rust-8ec3a833d5082a77e74a30c2d3d353ba7f5df644.zip | |
Auto merge of #21617 - alexcrichton:less-quotes, r=nikomatsakis
This ends up propagating all the way out to the output of dep-info which then makes Cargo think that files are not existent (it thinks the files have quotes in their name) when they in fact do.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index a74adbf4085..0d74af5caa4 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -135,7 +135,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) let bytes = match File::open(&file).read_to_end() { Err(e) => { cx.span_err(sp, - &format!("couldn't read {:?}: {}", + &format!("couldn't read {}: {}", file.display(), e)[]); return DummyResult::expr(sp); @@ -146,7 +146,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) Ok(src) => { // Add this input file to the code map to make it available as // dependency information - let filename = format!("{:?}", file.display()); + let filename = format!("{}", file.display()); let interned = token::intern_and_get_ident(&src[]); cx.codemap().new_filemap(filename, src); @@ -154,7 +154,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) } Err(_) => { cx.span_err(sp, - &format!("{:?} wasn't a utf-8 file", + &format!("{} wasn't a utf-8 file", file.display())[]); return DummyResult::expr(sp); } @@ -171,7 +171,7 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) match File::open(&file).read_to_end() { Err(e) => { cx.span_err(sp, - &format!("couldn't read {:?}: {}", file.display(), e)[]); + &format!("couldn't read {}: {}", file.display(), e)[]); return DummyResult::expr(sp); } Ok(bytes) => { |
