1
Fork 0

Display empty impl blocks if they have documentations

This commit is contained in:
Guillaume Gomez 2021-11-14 17:11:40 +01:00
parent d35d972e69
commit 5881fd5c95
5 changed files with 14 additions and 3 deletions

View file

@ -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>",