about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-28 17:12:19 +0200
committerGitHub <noreply@github.com>2024-08-28 17:12:19 +0200
commit472c9645fbe24060f542d1a48656883db97391e8 (patch)
treec0978793727e0f3204fc52d9f540dcabbed03e03 /compiler/rustc_parse/src/parser
parent5c2996d750a9a6a65ea4e5d3133be1f8f6b80ad1 (diff)
parentc35e01e48e4eb6850f20628dde49f1204c2242c8 (diff)
downloadrust-472c9645fbe24060f542d1a48656883db97391e8.tar.gz
rust-472c9645fbe24060f542d1a48656883db97391e8.zip
Rollup merge of #129667 - dev-ardi:rustc_driver-cleanup, r=michaelwoerister
Rustc driver cleanup

This adds a few comments to the driver to clarify a bit what's happening and does some cleanup.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/item.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs
index 14da6c331f1..c6a5e1908f7 100644
--- a/compiler/rustc_parse/src/parser/item.rs
+++ b/compiler/rustc_parse/src/parser/item.rs
@@ -51,7 +51,9 @@ impl<'a> Parser<'a> {
     }
 
     /// Parses the contents of a module (inner attributes followed by module items).
-    /// We exit once we hit `term`
+    /// We exit once we hit `term` which can be either
+    /// - EOF (for files)
+    /// - `}` for mod items
     pub fn parse_mod(
         &mut self,
         term: &TokenKind,