-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-cygwinTarget: *-pc-cygwinTarget: *-pc-cygwinT-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
The following code:
// src/lib.rs
#![feature(doc_cfg)]
#[doc(cfg(any(target_os = "linux", target_os = "cygwin")))]
pub fn my_function() {}
is rendered by rustdoc like this:

I expected the cygwin requirement to be rendered along the lines of "Available on Cygwin only", but it is displayed as target_os="cygwin"
instead which stands out unnecessarily.
I included a Linux requirement in the example for comparison. The issue happens without the any(target_os = "linux", _)
part.
Version
$ rustdoc +nightly --version
rustdoc 1.90.0-nightly (ba7e63b63 2025-07-29)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-cygwinTarget: *-pc-cygwinTarget: *-pc-cygwinT-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.