Skip to content

Commit 395e95c

Browse files
committed
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.
1 parent 39d51bd commit 395e95c

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ impl<'a> Parser<'a> {
11551155
let mut i = 0;
11561156
let mut token = Token::dummy();
11571157
while i < dist {
1158-
token = cursor.next(/* desugar_doc_comments */ false).0;
1158+
token = cursor.next(cursor.desugar_doc_comments).0;
11591159
if matches!(
11601160
token.kind,
11611161
token::OpenDelim(Delimiter::Invisible) | token::CloseDelim(Delimiter::Invisible)

0 commit comments

Comments
 (0)