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
IntoDiscriminant
as a macro re-export.This is a compilation error because
IntoDiscriminant
is not in the location expected by theDocumentMacroRexports
macro. It's also semantically suspect asIntoDiscriminant
is 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
IntoDiscriminant
back 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 docsrs
in thestrum
directory 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
EnumDiscriminants
not being available when compiling without thederive
feature, and not sure if theIntoDiscriminant
trait should be gated to prevent this, but I'm leaving this alone for the meantime as it's not really the issue at hand.