Remove auto trait implementation section when empty
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user