diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-08-26 14:08:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-26 14:08:48 +0200 |
| commit | 7cffb4ca63a71edbf5ecbddef9fc5a3075cf6a1a (patch) | |
| tree | 90489c484a92c1557e2f6e7c4460a2d28c777da7 /src/librustdoc/html/render/mod.rs | |
| parent | 378f851e95b706701af64de4c80f655b9654661c (diff) | |
| parent | 2ed945407f050385b6d4c34580f9b59db02a1b68 (diff) | |
| download | rust-7cffb4ca63a71edbf5ecbddef9fc5a3075cf6a1a.tar.gz rust-7cffb4ca63a71edbf5ecbddef9fc5a3075cf6a1a.zip | |
Rollup merge of #101006 - GuillaumeGomez:doc-cfg-reexport, r=notriddle
Fix doc cfg on reexports Fixes #83428. The problem was that the newly inlined item cfg propagation was not working since its real parent is different than its current one. For the implementation, I decided to put it directly into `CfgPropagation` instead of inside `inline.rs` because I thought it would be simpler to maintain and to not forget if new kind of items are added if it's all done in one place. r? `@notriddle`
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index b1d2872019e..6272f47f460 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -516,7 +516,14 @@ fn portability(item: &clean::Item, parent: Option<&clean::Item>) -> Option<Strin (cfg, _) => 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!("<div class=\"stab portability\">{}</div>", cfg?.render_long_html())) } |
