From 01d64f5e3eb309a41a40fbbaf5d6bd9d20f86bee Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 25 Aug 2022 16:42:17 +0200 Subject: Fix missing cfg propagation for reexports --- src/librustdoc/html/render/mod.rs | 9 ++++++++- src/librustdoc/html/render/print_item.rs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index f9d6b4619cc..020f6a74d69 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -522,7 +522,14 @@ fn portability(item: &clean::Item, parent: Option<&clean::Item>) -> Option cfg.as_deref().cloned(), }; - debug!("Portability {:?} - {:?} = {:?}", item.cfg, parent.and_then(|p| p.cfg.as_ref()), cfg); + debug!( + "Portability {:?} {:?} (parent: {:?}) - {:?} = {:?}", + item.name, + item.cfg, + parent, + parent.and_then(|p| p.cfg.as_ref()), + cfg + ); Some(format!("
{}
", cfg?.render_long_html())) } diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 6d0a825fec8..a313b896e84 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -477,7 +477,7 @@ fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) -> (cfg, _) => cfg.as_deref().cloned(), }; - debug!("Portability {:?} - {:?} = {:?}", item.cfg, parent.cfg, cfg); + debug!("Portability name={:?} {:?} - {:?} = {:?}", item.name, item.cfg, parent.cfg, cfg); if let Some(ref cfg) = cfg { tags += &tag_html("portability", &cfg.render_long_plain(), &cfg.render_short_html()); } -- cgit 1.4.1-3-g733a5