Fix docsrs build error regarding IntoDiscriminant trait#414
Fix docsrs build error regarding IntoDiscriminant trait#414Peternator7 merged 1 commit intoPeternator7:masterfrom tveness:master
Conversation
EnumDiscriminants is the actual macro
Hello, |
|
Fixes #415 |
The current build on docs.rs is failing.
This is due to the inclusion of
IntoDiscriminantas a macro re-export.This is a compilation error because
IntoDiscriminantis not in the location expected by theDocumentMacroRexportsmacro. It's also semantically suspect asIntoDiscriminantis also not a macro, so it seems strange for it to be included in the list more generally.The current PR resolves this by renaming
IntoDiscriminantback toEnumDiscriminants, effectively reverting a change introduced in PR377. Perhaps @vpochapuis can comment on whether this is a good idea and if there are alternative approachs to resolving the issue.Running
cargo +nightly rustdoc --features derive -- --cfg docsrsin thestrumdirectory is sufficient to reproduce the build failure, and confirms that current commit resolves the error. It could also be worth adding this to CI to ensure that docs builds don't fail in the future?Aside: It would also be nice to somehow resolve the docs warnings of
EnumDiscriminantsnot being available when compiling without thederivefeature, and not sure if theIntoDiscriminanttrait should be gated to prevent this, but I'm leaving this alone for the meantime as it's not really the issue at hand.