docs: document how semver-exempt APIs are enabled on Span::eq - #541
Open
TrueFurina wants to merge 1 commit into
Open
TrueFurina wants to merge 1 commit into
TrueFurina wants to merge 1 commit into
Conversation
Span::eq is semver-exempt and deliberately not a Cargo feature; it is enabled via `--cfg procmacro2_semver_exempt` in RUSTFLAGS from the top-level crate (README "Unstable features"). The method docs said only "not exposed by default", which led to a downstream failure trying to enable it as a feature (dtolnay#538). Document the actual enablement mechanism on the method itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #538.
Background
Span::eqis#[cfg(procmacro2_semver_exempt)]and its docs say only"semver exempt and not exposed by default". As kevinmehall clarified in
#538, this is deliberate: semver-exempt APIs are not a Cargo feature and
must be enabled by passing
--cfg procmacro2_semver_exemptinRUSTFLAGSfrom the top-level crate (documented in the README's "Unstable features"
section). But nothing on the method itself points there, so downstream
users reasonably try
features = ["procmacro2_semver_exempt"]and get aversion-selection error.
Change (docs-only)
Span::eq's doc comment now states the actual enablement mechanism andlinks to the "Unstable features" section of the crate documentation.
No code behavior is changed.
Verification
#[cfg(procmacro2_semver_exempt)]so thedefault build and tests are untouched