-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationB-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-doc_auto_cfg`#![feature(doc_auto_cfg)]``#![feature(doc_auto_cfg)]`F-doc_cfg`#![feature(doc_cfg)]``#![feature(doc_cfg)]`S-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.Status: The implementation is "complete" but it needs time to bake.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
This is a tracking issue for RFC 3631.
The feature gate for this doc_cfg (doc_cfg_hide and doc_auto_cfg were removed in favor this overarching one).
Part of #1998.
Note
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports.
Instead, open a dedicated issue for the specific matter or post in the #t-rustdoc Zulip channel.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Experimental implementation
- Adjust documentation
- Write an RFC
- Update implementation to match RFC
- Check performance impact on big crates
- Stabilization PR (see instructions on forge):
Unresolved questions
- Should we change the syntax of hiding/showing cfgs? The current syntax,
#[doc(cfg(hide(…)))]&#[doc(cfg(show(…)))]might not be super forward compatible given recent T-lang discussions about potential "general cfg predicates" like a potential#[cfg(rust_version(…))]or#[cfg(since(…))](notice the(…)instead of the= …!)) (cc Decision: Use the condition namerust_versionfor RFC 2523 #142651, #t-lang > cfg(version(..)) as a version comparison predicate) meaninghide(…)&show(…)could become ambiguous in the feature (doc cfg hide/show vs. custom predicate calledhide/show) - We're lacking a way to hide cfgs where "the key is fixed but the value is not not". Rephrased there's no way to say "hide
FIXED_KEY="ANY_VALUE"for all stringsANY_VALUEgiven a fixedFIXED_KEY" sincehide(FIXED_KEY)would only hideFIXED_KEYs without a value (!) (as--cfg FIXED_KEYand--cfg FIXED_KEY='"FIXED_VALUE"'are basically entirely separate cfgs)
Implementation history
asomers, Robbepop, stepancheg, DianaNites, mehcode and 53 morehwittenborn, acheroncrypto, RigoOnRails, BenLeadbetter, KmolYuan and 2 moredenisandroid, hwittenborn, bczhc, RigoOnRails, kands-code and 1 more
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationB-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-doc_auto_cfg`#![feature(doc_auto_cfg)]``#![feature(doc_auto_cfg)]`F-doc_cfg`#![feature(doc_cfg)]``#![feature(doc_cfg)]`S-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.Status: The implementation is "complete" but it needs time to bake.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
Rejected/Not lang