-
Notifications
You must be signed in to change notification settings - Fork 13.4k
doc_auto_cfg
no longer applies a cfg badge to certain inlined cross-crate re-exported items with a #[cfg]
#141301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The search results for the GH query |
|
MCVE:
pub struct Owner;
impl Owner { #[cfg(cond)] pub fn func() {}
#![feature(doc_auto_cfg)]
extern crate dep;
pub use dep::Owner; |
My crude manual bisection leads me to believe that PR #138844 most likely regressed this. |
doc_auto_cfg
used to apply a cfg badge to items with a #[cfg]
that were re-export but no longer doesdoc_auto_cfg
no longer applies a cfg badge to inlined cross-crate re-exported associated(!) items with a #[cfg]
doc_auto_cfg
no longer applies a cfg badge to inlined cross-crate re-exported associated(!) items with a #[cfg]
doc_auto_cfg
no longer applies a cfg badge to certain inlined cross-crate re-exported items with a #[cfg]
MCVE with a free item (the glob import over an explicit/individual import is imperative for the repro (the latter never "worked")):
#[cfg(cond)] pub fn func() {}
#![feature(doc_auto_cfg)]
extern crate dep;
pub use dep::*; |
I'm gonna take a look once #138907 will be merged. |
I think we now simply need to look for I haven't investigated anything that's just what I remember from reading petrochenkov's PRs when they were newly opened. |
Yes we do but it's already done in #138907 so I think it's better to check if it's still an issue once merged to reduce the workload for us. :3 |
Huh, I'm surprised that ever worked, how is rustdoc supposed to know whether these cfg should be shown? They make sense in the case of façade crates with the same set of features as the crates they reëxport from, but not in other reëxport cases (and not every façade crate will use the exact same feature names as their components too). |
I tried something like this code:
clap_builder
:clap
:I expected to see this happen: a
cfg
badge appears in bothclap
andclap_builder
s docs for this functionInstead, this happened: the
cfg
badge only appears onclap_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
The text was updated successfully, but these errors were encountered: