about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/mod.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-26 09:17:16 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-07-26 12:44:49 +1000
commit395e95c4900367930af2f18c9a53ce18ed55d5d5 (patch)
treed3990609fbaa5f6bb4bc5966805772475b6e7123 /compiler/rustc_parse/src/parser/mod.rs
parent39d51bd51c941021567e6adae1f80c3cbcc31d47 (diff)
downloadrust-395e95c4900367930af2f18c9a53ce18ed55d5d5.tar.gz
rust-395e95c4900367930af2f18c9a53ce18ed55d5d5.zip
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.
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 843e1e4d157..1bf48d509a1 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -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)