You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it guaranteed that strip_attrs_on_item will receive the token stream # [ this_attr_always_panics ] struct Foo ; and that if it does what it says on the tin and emits struct Foo ;, this_attr_always_panics is not called?
As an addendum, is this_attr_always_panics even resolved, if it's transformed before application?
derive macros have a special path to say "I handle this attribute" so derive(serde::Serialize) implies that you can use #[serde(..)] afterwards, and the derive gives it meaning. If expansion order isn't guaranteed outer before inner, then replacing the derive with an attribute would remove this ability.
This is not#578, which is about attributes within the same crate but on different items.
The text was updated successfully, but these errors were encountered:
In code, if I write
Is it guaranteed that
strip_attrs_on_item
will receive the token stream# [ this_attr_always_panics ] struct Foo ;
and that if it does what it says on the tin and emitsstruct Foo ;
,this_attr_always_panics
is not called?As an addendum, is
this_attr_always_panics
even resolved, if it's transformed before application?#565 is probably related. rust-lang/rust#63336 is this issue.
derive
macros have a special path to say "I handle this attribute" soderive(serde::Serialize)
implies that you can use#[serde(..)]
afterwards, and the derive gives it meaning. If expansion order isn't guaranteed outer before inner, then replacing the derive with an attribute would remove this ability.This is not #578, which is about attributes within the same crate but on different items.
The text was updated successfully, but these errors were encountered: