Description
Derive macros can add additional attributes into the scope of the item they are on. Said attributes are called derive macro helper attributes. These attributes are inert, and their only purpose is to be fed into the derive macro that defined them. That said, they can be seen by all macros.
When it says a derive macro can "add additional attributes into the scope", it does not make it very clear that it allows these helper attributes to be used in the scope. Instead, the way it is worded suggests the derive
macro can mutate its input TokenStream
, which as far as I am aware is not the case. I believe derive
macros are "pure"... with respect to their TokenStream, anyway.
...also "add additional" anything seems slightly repetitive, but that's relatively minor.