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;
15
15
/// for the attribute target. This allows us to perform cfg-expansion on
16
16
/// a token stream before we invoke a derive proc-macro.
17
17
///
18
- /// This wrapper prevents direct access to the underlying `ast::AttrVec> `.
18
+ /// This wrapper prevents direct access to the underlying `ast::AttrVec`.
19
19
/// Parsing code can only get access to the underlying attributes
20
20
/// by passing an `AttrWrapper` to `collect_tokens_trailing_tokens`.
21
21
/// This makes it difficult to accidentally construct an AST node
@@ -177,6 +177,10 @@ impl<'a> Parser<'a> {
177
177
/// into a `LazyAttrTokenStream`, and returned along with the result
178
178
/// of the callback.
179
179
///
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
+ ///
180
184
/// Note: If your callback consumes an opening delimiter
181
185
/// (including the case where you call `collect_tokens`
182
186
/// when the current token is an opening delimiter),
You can’t perform that action at this time.
0 commit comments