diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:22:24 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:22:24 -0800 |
| commit | 5c3ddcb15dc8b40fa780a38fd7494b9b5b991d09 (patch) | |
| tree | 9ad6d0c242e45a785dae4b22f1e4ddd9d4f9c55a /src/libsyntax/parse/mod.rs | |
| parent | 5f27b500800fc2720c5caa4a0cd5dcc46c0b911f (diff) | |
| parent | 44440e5c18a1dbcc9685866ffffe00c508929079 (diff) | |
| download | rust-5c3ddcb15dc8b40fa780a38fd7494b9b5b991d09.tar.gz rust-5c3ddcb15dc8b40fa780a38fd7494b9b5b991d09.zip | |
rollup merge of #20481: seanmonstar/fmt-show-string
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index b79f59cc0c1..82e2c8136a4 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -254,7 +254,7 @@ pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>) let bytes = match File::open(path).read_to_end() { Ok(bytes) => bytes, Err(e) => { - err(format!("couldn't read {}: {}", + err(format!("couldn't read {:?}: {:?}", path.display(), e).index(&FullRange)); unreachable!() @@ -266,7 +266,7 @@ pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>) path.as_str().unwrap().to_string()) } None => { - err(format!("{} is not UTF-8 encoded", path.display()).index(&FullRange)) + err(format!("{:?} is not UTF-8 encoded", path.display()).index(&FullRange)) } } unreachable!() @@ -539,7 +539,7 @@ fn looks_like_width_suffix(first_chars: &[char], s: &str) -> bool { fn filtered_float_lit(data: token::InternedString, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> ast::Lit_ { - debug!("filtered_float_lit: {}, {}", data, suffix); + debug!("filtered_float_lit: {}, {:?}", data, suffix); match suffix { Some("f32") => ast::LitFloat(data, ast::TyF32), Some("f64") => ast::LitFloat(data, ast::TyF64), @@ -559,7 +559,7 @@ fn filtered_float_lit(data: token::InternedString, suffix: Option<&str>, } } pub fn float_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> ast::Lit_ { - debug!("float_lit: {}, {}", s, suffix); + debug!("float_lit: {:?}, {:?}", s, suffix); // FIXME #2252: bounds checking float literals is defered until trans let s = s.chars().filter(|&c| c != '_').collect::<String>(); let data = token::intern_and_get_ident(&*s); @@ -664,7 +664,7 @@ pub fn integer_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> let s2 = s.chars().filter(|&c| c != '_').collect::<String>(); let mut s = s2.index(&FullRange); - debug!("integer_lit: {}, {}", s, suffix); + debug!("integer_lit: {}, {:?}", s, suffix); let mut base = 10; let orig = s; @@ -729,8 +729,8 @@ pub fn integer_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> } } - debug!("integer_lit: the type is {}, base {}, the new string is {}, the original \ - string was {}, the original suffix was {}", ty, base, s, orig, suffix); + debug!("integer_lit: the type is {:?}, base {:?}, the new string is {:?}, the original \ + string was {:?}, the original suffix was {:?}", ty, base, s, orig, suffix); let res: u64 = match ::std::num::from_str_radix(s, base) { Some(r) => r, |
