1
Fork 0

rustdoc: Show when traits are auto traits

This commit is contained in:
Oliver Middleton 2018-01-23 01:04:24 +00:00
parent fdc18b3067
commit 04a884726a
7 changed files with 54 additions and 2 deletions

View file

@ -2339,9 +2339,10 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
// Output the trait definition
write!(w, "<pre class='rust trait'>")?;
render_attributes(w, it)?;
write!(w, "{}{}trait {}{}{}",
write!(w, "{}{}{}trait {}{}{}",
VisSpace(&it.visibility),
UnsafetySpace(t.unsafety),
if t.is_auto { "auto " } else { "" },
it.name.as_ref().unwrap(),
t.generics,
bounds)?;