Remove auto trait implementation section when empty
This commit is contained in:
parent
fedce67cd2
commit
7dc71ec009
2 changed files with 30 additions and 8 deletions
|
@ -3181,14 +3181,16 @@ fn render_assoc_items(w: &mut fmt::Formatter,
|
|||
render_impls(cx, w, concrete, containing_item)?;
|
||||
write!(w, "</div>")?;
|
||||
|
||||
write!(w, "
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='synthetic-implementations-list'>
|
||||
")?;
|
||||
render_impls(cx, w, synthetic, containing_item)?;
|
||||
write!(w, "</div>")?;
|
||||
if !synthetic.is_empty() {
|
||||
write!(w, "
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='synthetic-implementations-list'>
|
||||
")?;
|
||||
render_impls(cx, w, synthetic, containing_item)?;
|
||||
write!(w, "</div>")?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue