Tweak Parser::look_ahead.
It doesn't really matter what the `desugar_doc_comments` argument is here, because in practice we never look ahead through doc comments. Changing it to `cursor.desugar_doc_comments` will allow some follow-up simplifications.
This commit is contained in:
@@ -1155,7 +1155,7 @@ impl<'a> Parser<'a> {
|
||||
let mut i = 0;
|
||||
let mut token = Token::dummy();
|
||||
while i < dist {
|
||||
token = cursor.next(/* desugar_doc_comments */ false).0;
|
||||
token = cursor.next(cursor.desugar_doc_comments).0;
|
||||
if matches!(
|
||||
token.kind,
|
||||
token::OpenDelim(Delimiter::Invisible) | token::CloseDelim(Delimiter::Invisible)
|
||||
|
||||
Reference in New Issue
Block a user