-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Starting with version 2 the generated type is a thin wrapper around an internal InternalBitFlags type that contains all the actual implementations. #[derive(...)] attributes can only be attached to the external type and not the internal type. This leads to problems for most derive macros because they require the macro to be applied to the internal type as well.
One strategy to solve this is to create a cargo feature for each crate that provides such macros and then derive its derive macros on the inner type if the feature is enabled (see #311, #312, #325). Unfortunately this is inherently limited to public crates: This solution does not work for non-public crates that use their own derive macros. I'd like to be able to use my custom derive macros on the internal type without having to publish the derive macro and adding it as a dependency on bitflags.