Rollup merge of #90905 - GuillaumeGomez:empty-impl-blocks, r=jsha
Add empty impl blocks if they have documentation Fixes https://github.com/rust-lang/rust/issues/90866. The update for the test script is needed to count the number of impl blocks we have with only the struct. To be noted that with https://github.com/rust-lang/rust/pull/89676 merged, it wouldn't be needed (I don't know what is the status of it btw. cc ```@Mark-Simulacrum).``` It looks like this:  cc ```@jyn514``` r? ```@camelid```
This commit is contained in:
commit
77f0209fde
7 changed files with 68 additions and 19 deletions
|
@ -1600,6 +1600,13 @@ fn render_impl(
|
|||
}
|
||||
|
||||
if let Some(ref dox) = i.impl_item.collapsed_doc_value() {
|
||||
if trait_.is_none() && i.inner_impl().items.is_empty() {
|
||||
w.write_str(
|
||||
"<div class=\"item-info\">\
|
||||
<div class=\"stab empty-impl\">This impl block contains no items.</div>
|
||||
</div>",
|
||||
);
|
||||
}
|
||||
write!(
|
||||
w,
|
||||
"<div class=\"docblock\">{}</div>",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue