Skip to content

Commit 1fbb3ec

Browse files
committed
Expand another comment.
1 parent 2193893 commit 1fbb3ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_parse/src/parser/attr_wrapper.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)