Skip to content

Commit b581fed

Browse files
Generate missing source link on impl associated types
1 parent a60a9e5 commit b581fed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/librustdoc/html/render/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,7 @@ fn render_impl(
17301730
let source_id = format!("{item_type}.{name}");
17311731
let id = cx.derive_id(&source_id);
17321732
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
1733+
render_rightside(w, cx, item, render_mode);
17331734
if trait_.is_some() {
17341735
// Anchors are only used on trait impls.
17351736
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
@@ -1751,6 +1752,7 @@ fn render_impl(
17511752
let source_id = format!("{item_type}.{name}");
17521753
let id = cx.derive_id(&source_id);
17531754
write!(w, "<section id=\"{id}\" class=\"{item_type}{in_trait_class}\">");
1755+
render_rightside(w, cx, item, render_mode);
17541756
if trait_.is_some() {
17551757
// Anchors are only used on trait impls.
17561758
write!(w, "<a href=\"#{id}\" class=\"anchor\">§</a>");
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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>
1+
<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>

0 commit comments

Comments
 (0)