Expand another comment.

This commit is contained in:
Nicholas Nethercote 2024-06-19 10:12:37 +10:00
parent 219389360c
commit 1fbb3eca67

View File

@ -15,7 +15,7 @@
/// for the attribute target. This allows us to perform cfg-expansion on /// for the attribute target. This allows us to perform cfg-expansion on
/// a token stream before we invoke a derive proc-macro. /// 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 /// Parsing code can only get access to the underlying attributes
/// by passing an `AttrWrapper` to `collect_tokens_trailing_tokens`. /// by passing an `AttrWrapper` to `collect_tokens_trailing_tokens`.
/// This makes it difficult to accidentally construct an AST node /// 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 /// into a `LazyAttrTokenStream`, and returned along with the result
/// of the callback. /// 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 /// Note: If your callback consumes an opening delimiter
/// (including the case where you call `collect_tokens` /// (including the case where you call `collect_tokens`
/// when the current token is an opening delimiter), /// when the current token is an opening delimiter),