diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index d58cfcf18b6..a3f446885f9 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2489,7 +2489,16 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, write!(w, "{}", impl_header)?; for implementor in local { - write!(w, "
")?;
+ write!(w, "")?;
+ if let Some(item) = implementor2item(&cache, implementor) {
+ if let Some(l) = (Item { cx, item }).src_href() {
+ write!(w, "")?;
+ write!(w, "[src]",
+ l, "goto source code")?;
+ write!(w, "")?;
+ }
+ }
+ write!(w, "")?;
// If there's already another implementor that has the same abbridged name, use the
// full path, for example in `std::iter::ExactSizeIterator`
let use_absolute = match implementor.impl_.for_ {