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

@@ -85,7 +85,7 @@ fn native(cx: &mut ExtCtxt, sp: codemap::Span, tts: &[ast::TokenTree])
let re = match Regex::new(regex.to_owned()) {
Ok(re) => re,
Err(err) => {
cx.span_err(sp, err.to_str());
cx.span_err(sp, err.to_str().as_slice());
return DummyResult::any(sp)
}
};
@@ -612,7 +612,7 @@ fn parse(cx: &mut ExtCtxt, tts: &[ast::TokenTree]) -> Option<StrBuf> {
_ => {
cx.span_err(entry.span, format!(
"expected string literal but got `{}`",
pprust::lit_to_str(lit)));
pprust::lit_to_str(lit)).as_slice());
return None
}
}
@@ -620,7 +620,7 @@ fn parse(cx: &mut ExtCtxt, tts: &[ast::TokenTree]) -> Option<StrBuf> {
_ => {
cx.span_err(entry.span, format!(
"expected string literal but got `{}`",
pprust::expr_to_str(entry)));
pprust::expr_to_str(entry)).as_slice());
return None
}
};