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:
parent
0a2e9ade83
commit
b4448435f9
5 changed files with 158 additions and 97 deletions
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue