1
Fork 0

auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton

This should block on #14323
This commit is contained in:
bors 2014-05-27 17:46:48 -07:00
commit 911cc9c352
387 changed files with 3016 additions and 3012 deletions

View file

@ -407,7 +407,7 @@ impl<'a> Parser<'a> {
let mut i = tokens.iter();
// This might be a sign we need a connect method on Iterator.
let b = i.next()
.map_or("".to_strbuf(), |t| Parser::token_to_str(t));
.map_or("".to_string(), |t| Parser::token_to_str(t));
i.fold(b, |b,a| {
let mut b = b;
b.push_str("`, `");
@ -4160,7 +4160,7 @@ impl<'a> Parser<'a> {
outer_attrs, "path") {
Some(d) => (dir_path.join(d), true),
None => {
let mod_name = mod_string.get().to_owned();
let mod_name = mod_string.get().to_string();
let default_path_str = format!("{}.rs", mod_name);
let secondary_path_str = format!("{}/mod.rs", mod_name);
let default_path = dir_path.join(default_path_str.as_slice());
@ -4172,7 +4172,7 @@ impl<'a> Parser<'a> {
self.span_err(id_sp,
"cannot declare a new module at this location");
let this_module = match self.mod_path_stack.last() {
Some(name) => name.get().to_strbuf(),
Some(name) => name.get().to_string(),
None => self.root_module_name.get_ref().clone(),
};
self.span_note(id_sp,
@ -4213,7 +4213,7 @@ impl<'a> Parser<'a> {
};
self.eval_src_mod_from_path(file_path, owns_directory,
mod_string.get().to_strbuf(), id_sp)
mod_string.get().to_string(), id_sp)
}
fn eval_src_mod_from_path(&mut self,