1
Fork 0

rustdoc: Fix issues with cross-crate inlined associated items

* Visibility was missing from impl items.
* Attributes and docs were missing from consts and types in impls.
* Const default values were missing from traits.

This unifies the code that handles associated items from impls and traits.
This commit is contained in:
Oliver Middleton 2017-11-29 22:05:38 +00:00
parent 0a2e9ade83
commit b4448435f9
5 changed files with 158 additions and 97 deletions

View file

@ -2621,7 +2621,8 @@ fn assoc_const(w: &mut fmt::Formatter,
ty: &clean::Type,
_default: Option<&String>,
link: AssocItemLink) -> fmt::Result {
write!(w, "const <a href='{}' class=\"constant\"><b>{}</b></a>: {}",
write!(w, "{}const <a href='{}' class=\"constant\"><b>{}</b></a>: {}",
VisSpace(&it.visibility),
naive_assoc_href(it, link),
it.name.as_ref().unwrap(),
ty)?;