about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-31 12:49:01 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-07-31 14:47:08 +1000
commit2e6ce68fba372f2a334abfe3f0118782776b8b74 (patch)
tree9c57a7c283bed54ed15647846fa9c446e3514f36 /compiler/rustc_parse/src/parser
parentd72fc5ce445c9a84dc289334b8aa7b34a144619b (diff)
downloadrust-2e6ce68fba372f2a334abfe3f0118782776b8b74.tar.gz
rust-2e6ce68fba372f2a334abfe3f0118782776b8b74.zip
Remove `desugar_doc_comments` arg from `Parser::new()`.
It's only true at one call site; do the desugaring there instead.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 7d39bf8edf3..d689b61f63f 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -388,14 +388,9 @@ pub(super) fn token_descr(token: &Token) -> String {
 impl<'a> Parser<'a> {
     pub fn new(
         sess: &'a ParseSess,
-        mut stream: TokenStream,
-        desugar_doc_comments: bool,
+        stream: TokenStream,
         subparser_name: Option<&'static str>,
     ) -> Self {
-        if desugar_doc_comments {
-            stream.desugar_doc_comments();
-        }
-
         let mut parser = Parser {
             sess,
             token: Token::dummy(),