Tracking issue for release notes of #159014: [rustdoc] Do not take `doc(cfg())` into account when filtering doctests
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- documentation, release
Research direction
Start with the Release notes text section in this issue, then read the linked Forge release-notes chapter and previous releases for category and wording conventions. Review the proposed rustdoc entry and release blog section, making any needed edits so the change is accurately categorized and succinctly described; leave the blog section empty if it is not notable enough.
Written by the indexing model from the issue text.
Description
This issue tracks the release notes text for #159014.
cc @GuillaumeGomez, @Urgau -- original issue/PR authors and assignees for drafting text
See the forge.rust-lang.org chapter about release notes for an overview of how the release team makes use of these tracking issues.
Release notes text
This section should be edited to specify the correct category(s) for the change, with succinct description(s) of what changed. Some things worth considering:
- Does this need an additional compat notes section?
- Was this a libs stabilization that should have additional headers to list new APIs under
Stabilized APIsandConst Stabilized APIs?
# Language/Compiler/Libraries/Stabilized APIs/Const Stabilized APIs/Rustdoc/Compatibility Notes/Internal Changes/Other
- [[rustdoc] Do not take `doc(cfg())` into account when filtering doctests](https://github.com/rust-lang/rust/pull/159014)
[!TIP]
Use the previous releases for inspiration on how to write the release notes text and which categories to pick.
Release blog section
If this change is notable enough for inclusion in the blog post then this section should be edited to contain a draft for the blog post. Otherwise leave it empty.
We used to take `doc(cfg())` into account to check whether or not a doctest should be run, but it was a bug. Now, if the item is available under the current `cfg`, its doctests will be run. If you want a doctest to be run on windows for example, you can do:
```rust
/// doc
///
#[cfg_attr(windows, doc = "```")]
#[cfg_attr(not(windows), doc = "```ignore")]
/// let x = 12;
/// ```
pub struct Foo;
```
Like that, if not on windows, the doctest will be ignored.
[!NOTE]
If a blog post section is required the
release-blog-postlabel should be added (@rustbot label +release-blog-post) to this issue as otherwise it may be missed by the release team.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 510
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/rust
-
needs-triage O-unix relnotes relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
A-CI A-spurious C-bug O-fuchsia T-infra
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
A-attributes needs-triage relnotes relnotes-tracking-issue T-compiler
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
needs-triage O-SGX relnotes relnotes-tracking-issue T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
needs-triage relnotes relnotes-tracking-issue T-bootstrap T-compiler
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100