Fix docsrs build error regarding IntoDiscriminant trait #414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.