-
-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde_derive fail involving conditional compilation #577
Comments
Thanks for the detailed report! This is a problem with the current Macros 1.1 implementation in Rust. I commented in the tracking issue so we will see whether it is something they can fix. For now the workaround is to always put derives that include custom derives above any other attributes: #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))]
#[derive(Copy, Clone)]
pub struct MyStruct {
value: i64,
} |
Thanks! The workaround works :) |
This will be fixed by rust-lang/rust#37067. |
…excrichton macros: expand `#[derive]`s after other attribute macros and improve intra-`#[derive]` ordering Fixes serde-rs/serde#577. cc rust-lang#35900 r? @alexcrichton
…excrichton macros: expand `#[derive]`s after other attribute macros and improve intra-`#[derive]` ordering Fixes serde-rs/serde#577. cc rust-lang#35900 r? @alexcrichton
This has been fixed as of rustc 1.14.0-nightly (e0111758e 2016-10-17). |
Cargo.toml
:src/lib.rs
:Meta:
The text was updated successfully, but these errors were encountered: