Closed vpochapuis closed 1 month ago
I should note that these changes break the following user code:
#[derive(EnumDiscriminants)]
#[strum_discriminants(name(PrivateDiscriminants), vis(pub(self)))]
pub enum PublicEnum {
Variant0(bool),
Variant1 { a: bool },
}
The error message is:
error[E0446]: private type `PrivateDiscriminants` in public interface
This is because the IntoDiscriminant
impl of PublicEnum
leaks the private PrivateDiscriminants
type. Should we maybe exclude the IntoDiscriminant
impl when the parent enum is public and the generated enum is private?
This PR has for goal to implement and resolve https://github.com/Peternator7/strum/issues/376 as well as https://github.com/Peternator7/strum/pull/176