Don't generate anchors on inherent impl methods
This commit is contained in:
parent
5b8cf49c51
commit
7d205afae4
@ -1415,7 +1415,10 @@ fn render_impl(
|
|||||||
id, item_type, in_trait_class,
|
id, item_type, in_trait_class,
|
||||||
);
|
);
|
||||||
render_rightside(w, cx, item, containing_item, render_mode);
|
render_rightside(w, cx, item, containing_item, render_mode);
|
||||||
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
if trait_.is_some() {
|
||||||
|
// Anchors are only used on trait impls.
|
||||||
|
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
||||||
|
}
|
||||||
w.write_str("<h4 class=\"code-header\">");
|
w.write_str("<h4 class=\"code-header\">");
|
||||||
render_assoc_item(
|
render_assoc_item(
|
||||||
w,
|
w,
|
||||||
@ -1438,7 +1441,10 @@ fn render_impl(
|
|||||||
id, item_type, in_trait_class
|
id, item_type, in_trait_class
|
||||||
);
|
);
|
||||||
render_rightside(w, cx, item, containing_item, render_mode);
|
render_rightside(w, cx, item, containing_item, render_mode);
|
||||||
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
if trait_.is_some() {
|
||||||
|
// Anchors are only used on trait impls.
|
||||||
|
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
||||||
|
}
|
||||||
w.write_str("<h4 class=\"code-header\">");
|
w.write_str("<h4 class=\"code-header\">");
|
||||||
assoc_const(
|
assoc_const(
|
||||||
w,
|
w,
|
||||||
@ -1460,7 +1466,10 @@ fn render_impl(
|
|||||||
let source_id = format!("{}.{}", item_type, name);
|
let source_id = format!("{}.{}", item_type, name);
|
||||||
let id = cx.derive_id(source_id.clone());
|
let id = cx.derive_id(source_id.clone());
|
||||||
write!(w, "<section id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class);
|
write!(w, "<section id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class);
|
||||||
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
if trait_.is_some() {
|
||||||
|
// Anchors are only used on trait impls.
|
||||||
|
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
||||||
|
}
|
||||||
w.write_str("<h4 class=\"code-header\">");
|
w.write_str("<h4 class=\"code-header\">");
|
||||||
assoc_type(
|
assoc_type(
|
||||||
w,
|
w,
|
||||||
@ -1483,7 +1492,10 @@ fn render_impl(
|
|||||||
"<section id=\"{}\" class=\"{}{} has-srclink\">",
|
"<section id=\"{}\" class=\"{}{} has-srclink\">",
|
||||||
id, item_type, in_trait_class
|
id, item_type, in_trait_class
|
||||||
);
|
);
|
||||||
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
if trait_.is_some() {
|
||||||
|
// Anchors are only used on trait impls.
|
||||||
|
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
|
||||||
|
}
|
||||||
w.write_str("<h4 class=\"code-header\">");
|
w.write_str("<h4 class=\"code-header\">");
|
||||||
assoc_type(
|
assoc_type(
|
||||||
w,
|
w,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user