Rollup merge of #32558 - sanxiyn:rustdoc-self-link, r=steveklabnik
Avoid linking to itself in implementors section of trait page Fix #32474.
This commit is contained in:
commit
5d0dca363f
4 changed files with 54 additions and 10 deletions
|
@ -69,6 +69,7 @@ use html::escape::Escape;
|
|||
use html::format::{ConstnessSpace};
|
||||
use html::format::{TyParamBounds, WhereClause, href, AbiSpace};
|
||||
use html::format::{VisSpace, Method, UnsafetySpace, MutableSpace};
|
||||
use html::format::fmt_impl_for_trait_page;
|
||||
use html::item_type::ItemType;
|
||||
use html::markdown::{self, Markdown};
|
||||
use html::{highlight, layout};
|
||||
|
@ -2010,7 +2011,9 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
|||
match cache.implementors.get(&it.def_id) {
|
||||
Some(implementors) => {
|
||||
for i in implementors {
|
||||
writeln!(w, "<li><code>{}</code></li>", i.impl_)?;
|
||||
write!(w, "<li><code>")?;
|
||||
fmt_impl_for_trait_page(&i.impl_, w)?;
|
||||
writeln!(w, "</code></li>")?;
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue