diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index c591c09bf20e2..6f8c6aa7094dd 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -550,8 +550,8 @@ impl<'a> fmt::Display for HRef<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match href(self.did) { Some((url, shortty, fqp)) => if !f.alternate() { - write!(f, "{}", - shortty, url, fqp.join("::"), self.text) + write!(f, "{}", + shortty, url, shortty, fqp.join("::"), self.text) } else { write!(f, "{}", self.text) }, diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 6234d89024441..29b0c00d11b42 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1818,7 +1818,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context, write!(w, " {name}{unsafety_flag} + title='{title_type} {title}'>{name}{unsafety_flag} {stab_docs} {docs} @@ -1830,6 +1830,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context, stab = myitem.stability_class(), unsafety_flag = unsafety_flag, href = item_path(myitem.type_(), myitem.name.as_ref().unwrap()), + title_type = myitem.type_(), title = full_path(cx, myitem))?; } }