-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-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 RFCT-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 feature allows you to restrict items to only be compiled when rustdoc is collecting doctests. This allows you to isolate certain doctests that will be tested, but not shown in documentation - for example, if you need to use compile_fail
, or if you're testing the samples in your README file.
We had previously set cfg(test)
when collecting doctests, starting in #59940, but this caused issues with libcore that caused all its doctests to be ignored, so that was reverted in #61199. This feature is the replacement for that, currently unstable while we ensure the semantics. The PR where it was posted is #62213.
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-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 RFCT-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.