about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-22 15:16:31 -0700
committerbors <bors@rust-lang.org>2014-05-22 15:16:31 -0700
commit87ad19eb78239707f1ceed43e475c6aa052efdbc (patch)
tree35940d52f145bca81dcf73e5e7da7f3847ceb413 /src/libsyntax/parse/mod.rs
parente402e75f4eb79af09b9451f0f232f994b3e2c998 (diff)
parente878721d70349e2055f0ef854085de92e9498fde (diff)
downloadrust-87ad19eb78239707f1ceed43e475c6aa052efdbc.tar.gz
rust-87ad19eb78239707f1ceed43e475c6aa052efdbc.zip
auto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson
r? @brson
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 8e139b049c5..31a67ff92f5 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -224,7 +224,9 @@ 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 {}: {}", path.display(), e));
+            err(format!("couldn't read {}: {}",
+                        path.display(),
+                        e).as_slice());
             unreachable!()
         }
     };
@@ -233,7 +235,9 @@ pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
             return string_to_filemap(sess, s.to_strbuf(),
                                      path.as_str().unwrap().to_strbuf())
         }
-        None => err(format!("{} is not UTF-8 encoded", path.display())),
+        None => {
+            err(format!("{} is not UTF-8 encoded", path.display()).as_slice())
+        }
     }
     unreachable!()
 }