libstd: Remove ~str from all libstd modules except fmt and str.

This commit is contained in:
Patrick Walton 2014-05-16 10:45:16 -07:00
parent e402e75f4e
commit 36195eb91f
204 changed files with 2102 additions and 1496 deletions

View file

@ -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!()
}