Generate missing source link on impl associated types
This commit is contained in:
parent
a60a9e567a
commit
b581fed15e
@ -1730,6 +1730,7 @@ fn doc_impl_item(
|
|||||||
let source_id = format!("{item_type}.{name}");
|
let source_id = format!("{item_type}.{name}");
|
||||||
let id = cx.derive_id(&source_id);
|
let id = cx.derive_id(&source_id);
|
||||||
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
|
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
|
||||||
|
render_rightside(w, cx, item, render_mode);
|
||||||
if trait_.is_some() {
|
if trait_.is_some() {
|
||||||
// Anchors are only used on trait impls.
|
// Anchors are only used on trait impls.
|
||||||
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
|
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
|
||||||
@ -1751,6 +1752,7 @@ fn doc_impl_item(
|
|||||||
let source_id = format!("{item_type}.{name}");
|
let source_id = format!("{item_type}.{name}");
|
||||||
let id = cx.derive_id(&source_id);
|
let id = cx.derive_id(&source_id);
|
||||||
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
|
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
|
||||||
|
render_rightside(w, cx, item, render_mode);
|
||||||
if trait_.is_some() {
|
if trait_.is_some() {
|
||||||
// Anchors are only used on trait impls.
|
// Anchors are only used on trait impls.
|
||||||
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
|
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
|
||||||
|
@ -1 +1 @@
|
|||||||
<section id="associatedtype.Y" class="associatedtype"><h4 class="code-header">pub type <a href="#associatedtype.Y" class="associatedtype">Y</a> = <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
|
<section id="associatedtype.Y" class="associatedtype"><a class="src rightside" href="../src/foo/anchors.rs.html#45">source</a><h4 class="code-header">pub type <a href="#associatedtype.Y" class="associatedtype">Y</a> = <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
|
Loading…
Reference in New Issue
Block a user