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
{{ message }}
Repository navigation
Reordering of attributes passed to rustc_macro_derive #36211
Hm I'm not actually sure how to fix this offhand. When the #[derive] syntax extension is running the #[derive] attribute has already been removed, and then when we call the first Serialize implementation we manually push back on the #[derive(Deserialize)]. We could push it at the front instead of the back but I have a feeling that's probably also not the right place :(
Might require a more intrusive change to #[derive] to not remove the attribute at the beginning.
Oh right yeah we should put the #[derive] attribute back where we found it, but I don't think that information is available via the kind of syntax extension #[derive] is today?
Activity
alexcrichton commentedon Sep 2, 2016
Hm I'm not actually sure how to fix this offhand. When the
#[derive]syntax extension is running the#[derive]attribute has already been removed, and then when we call the firstSerializeimplementation we manually push back on the#[derive(Deserialize)]. We could push it at the front instead of the back but I have a feeling that's probably also not the right place :(Might require a more intrusive change to
#[derive]to not remove the attribute at the beginning.nrc commentedon Sep 2, 2016
Why? Putting the remaining derives back where the one we just took out seems like the right thing to do to me.
alexcrichton commentedon Sep 2, 2016
Oh right yeah we should put the
#[derive]attribute back where we found it, but I don't think that information is available via the kind of syntax extension#[derive]is today?dtolnay commentedon Sep 27, 2016
This only affected syntex and is no longer required as we move our rustc_macro away from syntex (serde-rs/serde#548).
dtolnay commentedon May 25, 2017
Without syntex this no longer matters.