diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index c591c09bf20..6f8c6aa7094 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)
},