Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use TokenStream::default() in more places.
  • Loading branch information
nnethercote committed Oct 13, 2019
1 parent 5c93492 commit 1ce0347
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Expand Up @@ -1548,7 +1548,7 @@ impl<'a> Parser<'a> {
// This can happen due to a bad interaction of two unrelated recovery mechanisms with
// mismatched delimiters *and* recovery lookahead on the likely typo `pub ident(`
// (#62881).
return Ok((ret?, TokenStream::new(vec![])));
return Ok((ret?, TokenStream::default()));
} else {
&mut self.token_cursor.stack[prev].last_token
};
Expand All @@ -1563,7 +1563,7 @@ impl<'a> Parser<'a> {
// This can happen due to a bad interaction of two unrelated recovery mechanisms
// with mismatched delimiters *and* recovery lookahead on the likely typo
// `pub ident(` (#62895, different but similar to the case above).
return Ok((ret?, TokenStream::new(vec![])));
return Ok((ret?, TokenStream::default()));
}
};

Expand Down

0 comments on commit 1ce0347

Please sign in to comment.