Skip to content

doc_cfg / doc_auto_cfg thinks any(true) and any(all()) are available nowhere #145075

@SabrinaJewson

Description

@SabrinaJewson

I tried this code:

#![feature(doc_auto_cfg)]
#[cfg(any(all()))]
pub fn f() {}

and:

#![feature(doc_auto_cfg)]
#[cfg(any(true))]
pub fn f() {}

I expected to see this happen: No doc_auto_cfg message appears in the documentation.

Instead, this happened:

Image

For a workaround, not(all(false)) seems to work fine.

Meta

rustc --version --verbose:

rustc 1.91.0-nightly (7d82b83ed 2025-08-06)
binary: rustc
commit-hash: 7d82b83ed57d188ab3f2441a765a6419685a88a3
commit-date: 2025-08-06
host: x86_64-unknown-linux-gnu
release: 1.91.0-nightly
LLVM version: 21.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cfgArea: `cfg` conditional compilationC-bugCategory: This is a bug.F-doc_auto_cfg`#![feature(doc_auto_cfg)]`F-doc_cfg`#![feature(doc_cfg)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions