This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use std::ops::Range;
1515/// for the attribute target. This allows us to perform cfg-expansion on
1616/// a token stream before we invoke a derive proc-macro.
1717///
18- /// This wrapper prevents direct access to the underlying `ast::AttrVec> `.
18+ /// This wrapper prevents direct access to the underlying `ast::AttrVec`.
1919/// Parsing code can only get access to the underlying attributes
2020/// by passing an `AttrWrapper` to `collect_tokens_trailing_tokens`.
2121/// This makes it difficult to accidentally construct an AST node
@@ -177,6 +177,10 @@ impl<'a> Parser<'a> {
177177 /// into a `LazyAttrTokenStream`, and returned along with the result
178178 /// of the callback.
179179 ///
180+ /// The `attrs` passed in are in `AttrWrapper` form, which is opaque. The
181+ /// `AttrVec` within is passed to `f`. See the comment on `AttrWrapper` for
182+ /// details.
183+ ///
180184 /// Note: If your callback consumes an opening delimiter
181185 /// (including the case where you call `collect_tokens`
182186 /// when the current token is an opening delimiter),
You can’t perform that action at this time.
0 commit comments