1
Fork 0

vec: convert append and append_one to methods

These were only free functions on `~[T]` because taking self by-value
used to be broken.
This commit is contained in:
Daniel Micay 2014-03-30 23:53:26 -04:00
parent 612e22e417
commit cbbc1fc843
30 changed files with 126 additions and 222 deletions

View file

@ -11,7 +11,6 @@
use driver::session::Session;
use std::vec;
use syntax::ast;
use syntax::attr;
use syntax::codemap::DUMMY_SP;
@ -173,7 +172,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
span: DUMMY_SP,
};
let vis = vec::append(vec!(vi2), module.view_items.as_slice());
let vis = (vec!(vi2)).append(module.view_items.as_slice());
// FIXME #2543: Bad copy.
let new_module = ast::Mod {