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`
This commit is contained in:
commit
7cffb4ca63
6 changed files with 104 additions and 8 deletions
|
@ -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()))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue