Change implementation of syntax::util::SmallVector to use data_structures::SmallVec.

This commit is contained in:
Mark-Simulacrum 2016-11-02 22:33:35 -06:00
parent 4da129d984
commit 7bbebb1f54
15 changed files with 575 additions and 288 deletions

View file

@ -104,7 +104,7 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[tokenstream::T
}
fn make_items(mut self: Box<ExpandResult<'a>>)
-> Option<SmallVector<P<ast::Item>>> {
let mut ret = SmallVector::zero();
let mut ret = SmallVector::new();
while self.p.token != token::Eof {
match panictry!(self.p.parse_item()) {
Some(item) => ret.push(item),