add [src] links to associated functions inside an impl block
This commit is contained in:
parent
5669c9988f
commit
c9bdd518eb
@ -2939,7 +2939,15 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
|
||||
write!(w, "<code>")?;
|
||||
render_assoc_item(w, item, link.anchor(&id), ItemType::Impl)?;
|
||||
write!(w, "</code>")?;
|
||||
render_stability_since_raw(w, item.stable_since(), outer_version)?;
|
||||
if let Some(l) = (Item { cx, item }).src_href() {
|
||||
write!(w, "</span><span class='out-of-band'>")?;
|
||||
write!(w, "<div class='ghost'></div>")?;
|
||||
render_stability_since_raw(w, item.stable_since(), outer_version)?;
|
||||
write!(w, "<a class='srclink' href='{}' title='{}'>[src]</a>",
|
||||
l, "goto source code")?;
|
||||
} else {
|
||||
render_stability_since_raw(w, item.stable_since(), outer_version)?;
|
||||
}
|
||||
write!(w, "</span></h4>\n")?;
|
||||
}
|
||||
}
|
||||
|
@ -297,6 +297,10 @@ h3.impl > .out-of-band {
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
h4.method > .out-of-band {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
h4 > code, h3 > code, .invisible > code {
|
||||
position: inherit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user