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>2024-06-19 10:12:37 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-06-19 18:53:24 +1000
commit1fbb3eca67032721e6f286e2a6f20da1b5659cc5 (patch)
tree37ef2758d6a5adb87c0d7948322124998df7d460 /compiler/rustc_parse/src/parser
parent219389360c0b20cd6b980072e08723b91fea2c9b (diff)
downloadrust-1fbb3eca67032721e6f286e2a6f20da1b5659cc5.tar.gz
rust-1fbb3eca67032721e6f286e2a6f20da1b5659cc5.zip
Expand another comment.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/attr_wrapper.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs
index 62c8f9f5dac..042ee21e3f7 100644
--- a/compiler/rustc_parse/src/parser/attr_wrapper.rs
+++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs
@@ -15,7 +15,7 @@ use std::ops::Range;
 /// for the attribute target. This allows us to perform cfg-expansion on
 /// a token stream before we invoke a derive proc-macro.
 ///
-/// This wrapper prevents direct access to the underlying `ast::AttrVec>`.
+/// This wrapper prevents direct access to the underlying `ast::AttrVec`.
 /// Parsing code can only get access to the underlying attributes
 /// by passing an `AttrWrapper` to `collect_tokens_trailing_tokens`.
 /// This makes it difficult to accidentally construct an AST node
@@ -177,6 +177,10 @@ impl<'a> Parser<'a> {
     /// into a `LazyAttrTokenStream`, and returned along with the result
     /// of the callback.
     ///
+    /// The `attrs` passed in are in `AttrWrapper` form, which is opaque. The
+    /// `AttrVec` within is passed to `f`. See the comment on `AttrWrapper` for
+    /// details.
+    ///
     /// Note: If your callback consumes an opening delimiter
     /// (including the case where you call `collect_tokens`
     /// when the current token is an opening delimiter),