libstd: Remove ~str
from all libstd
modules except fmt
and str
.
This commit is contained in:
parent
e402e75f4e
commit
36195eb91f
204 changed files with 2102 additions and 1496 deletions
|
@ -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!()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue