mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
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:
parent
39d51bd51c
commit
395e95c490
@ -1155,7 +1155,7 @@ impl<'a> Parser<'a> {
|
|||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
let mut token = Token::dummy();
|
let mut token = Token::dummy();
|
||||||
while i < dist {
|
while i < dist {
|
||||||
token = cursor.next(/* desugar_doc_comments */ false).0;
|
token = cursor.next(cursor.desugar_doc_comments).0;
|
||||||
if matches!(
|
if matches!(
|
||||||
token.kind,
|
token.kind,
|
||||||
token::OpenDelim(Delimiter::Invisible) | token::CloseDelim(Delimiter::Invisible)
|
token::OpenDelim(Delimiter::Invisible) | token::CloseDelim(Delimiter::Invisible)
|
||||||
|
Loading…
Reference in New Issue
Block a user