Skip to content

doc_auto_cfg no longer applies a cfg badge to certain inlined cross-crate re-exported items with a #[cfg] #141301

Open
@epage

Description

@epage

I tried something like this code:

clap_builder:

#[cfg(feature = "env")]
pub fn env() {}

clap:

pub use clap_builder::env;

I expected to see this happen: a cfg badge appears in both clap and clap_builders docs for this function

Instead, this happened: the cfg badge only appears on clap_builder

Meta

docs.rs build on 2025-03-27 (4.5.34) worked for clap and clap_builder

docs.rs build on 2025-04-01 (4.5.35) didn't work for clap while clap_builder did

clap diff

clap_builder diff

Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cfgArea: `cfg` conditional compilationA-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateC-bugCategory: This is a bug.F-doc_auto_cfg`#![feature(doc_auto_cfg)]`S-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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