rustdoc: Fix missing type parameters on impls

This commit is contained in:
Oliver Middleton
2016-05-12 18:23:11 +01:00
parent e88defe718
commit 538de73f5b
3 changed files with 30 additions and 8 deletions

View File

@@ -587,7 +587,13 @@ fn fmt_impl(i: &clean::Impl, f: &mut fmt::Formatter, link_trait: bool) -> fmt::R
if link_trait {
write!(f, "{}", *ty)?;
} else {
write!(f, "{}", ty.trait_name().unwrap())?;
match *ty {
clean::ResolvedPath{ typarams: None, ref path, is_generic: false, .. } => {
let last = path.segments.last().unwrap();
write!(f, "{}{}", last.name, last.params)?;
}
_ => unreachable!(),
}
}
write!(f, " for ")?;
}