Derived from this question:
https://users.rust-lang.org/t/why-are-proc-macro-derives-prohibited-for-unions/17065
Currently, we cannot apply custom derives to unions:
#[repr(C)]
#[derive(CustomDerive)]
union Value {
a: u64,
b: f64,
}
error: proc-macro derives may only be applied to struct/enum items
--> src/value.rs:48:10
|
48 | #[derive(CustomDerive)]
| ^^^^^^^^^^^^
This restriction should be removed if there is no technical issue.
Derived from this question:
https://users.rust-lang.org/t/why-are-proc-macro-derives-prohibited-for-unions/17065
Currently, we cannot apply custom derives to unions:
This restriction should be removed if there is no technical issue.