Add trait methods as well
This commit is contained in:
parent
85dcf2ecb6
commit
d86621f69e
2 changed files with 10 additions and 2 deletions
|
@ -2400,8 +2400,9 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
||||||
let item_type = m.type_();
|
let item_type = m.type_();
|
||||||
let id = derive_id(format!("{}.{}", item_type, name));
|
let id = derive_id(format!("{}.{}", item_type, name));
|
||||||
let ns_id = derive_id(format!("{}.{}", name, item_type.name_space()));
|
let ns_id = derive_id(format!("{}.{}", name, item_type.name_space()));
|
||||||
write!(w, "<h3 id='{id}' class='method'>\
|
write!(w, "{extra}<h3 id='{id}' class='method'>\
|
||||||
<span id='{ns_id}' class='invisible'><code>",
|
<span id='{ns_id}' class='invisible'><code>",
|
||||||
|
extra = render_spotlight_traits(m)?,
|
||||||
id = id,
|
id = id,
|
||||||
ns_id = ns_id)?;
|
ns_id = ns_id)?;
|
||||||
render_assoc_item(w, m, AssocItemLink::Anchor(Some(&id)), ItemType::Impl)?;
|
render_assoc_item(w, m, AssocItemLink::Anchor(Some(&id)), ItemType::Impl)?;
|
||||||
|
|
|
@ -438,10 +438,11 @@ h4 > code, h3 > code, .invisible > code {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content .methods > div { margin-left: 40px; }
|
.content .methods > div:not(.important-traits) { margin-left: 40px; }
|
||||||
|
|
||||||
.content .impl-items .docblock, .content .impl-items .stability {
|
.content .impl-items .docblock, .content .impl-items .stability {
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
|
margin-bottom: .6em;
|
||||||
}
|
}
|
||||||
.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
|
.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
@ -1045,4 +1046,10 @@ h3.important {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -24px;
|
left: -24px;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content > .methods > div.important-traits {
|
||||||
|
position: absolute;
|
||||||
|
left: -42px;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue