From 36195eb91f15975fed7555a3aa52807ecd5698a1 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 16 May 2014 10:45:16 -0700 Subject: libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`. --- src/libsyntax/parse/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/mod.rs') 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) 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) 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!() } -- cgit 1.4.1-3-g733a5