Skip to content
Discussion options

You must be logged in to vote

extract_attributes is if you want to remove the matched attributes from the field, mainly this is useful for attribute macros where the extra attributes have to be removed before the token stream is output again or it will cause errors.

In a derive macro you can use parse_attributes which takes a non-mutable reference. You may also be able to get your example to work by using iter_mut over the fields.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by romamik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10 on September 28, 2023 17:02.