@@ -279,8 +279,8 @@ fn create_matches(len: usize) -> Vec<Vec<Rc<NamedMatch>>> {
279
279
280
280
fn inner_parse_loop ( cur_eis : & mut SmallVector < Box < MatcherPos > > ,
281
281
next_eis : & mut Vec < Box < MatcherPos > > ,
282
- eof_eis : & mut Vec < Box < MatcherPos > > ,
283
- bb_eis : & mut Vec < Box < MatcherPos > > ,
282
+ eof_eis : & mut SmallVector < Box < MatcherPos > > ,
283
+ bb_eis : & mut SmallVector < Box < MatcherPos > > ,
284
284
token : & Token , span : & syntax_pos:: Span ) -> ParseResult < ( ) > {
285
285
while let Some ( mut ei) = cur_eis. pop ( ) {
286
286
// When unzipped trees end, remove them
@@ -412,12 +412,10 @@ pub fn parse(sess: &ParseSess, rdr: TtReader, ms: &[TokenTree]) -> NamedParseRes
412
412
let mut cur_eis = SmallVector :: one ( initial_matcher_pos ( ms. to_owned ( ) , parser. span . lo ) ) ;
413
413
414
414
loop {
415
- let mut bb_eis = Vec :: new ( ) ; // black-box parsed by parser.rs
415
+ let mut bb_eis = SmallVector :: new ( ) ; // black-box parsed by parser.rs
416
+ let mut eof_eis = SmallVector :: new ( ) ;
416
417
let mut next_eis = Vec :: new ( ) ; // or proceed normally
417
418
418
- // FIXME: Use SmallVector since in the successful case we will only have one
419
- let mut eof_eis = Vec :: new ( ) ;
420
-
421
419
match inner_parse_loop ( & mut cur_eis, & mut next_eis, & mut eof_eis, & mut bb_eis,
422
420
& parser. token , & parser. span ) {
423
421
Success ( _) => { } ,
0 commit comments