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, "