rustdoc: Fix links to Box/Gc

These are lang items now, so the internal representations need to be
re-translated back to the original structures manually.

Closes #15185
Closes #15800
This commit is contained in:
Alex Crichton
2014-07-25 09:31:20 -07:00
parent 15a727bba1
commit 431622e1e2
2 changed files with 48 additions and 14 deletions

View File

@@ -444,8 +444,6 @@ impl fmt::Show for clean::Type {
format!("[{}, ..{}]", **t, *s).as_slice())
}
clean::Bottom => f.write("!".as_bytes()),
clean::Unique(ref t) => write!(f, "Box<{}>", **t),
clean::Managed(ref t) => write!(f, "Gc<{}>", **t),
clean::RawPointer(m, ref t) => {
write!(f, "*{}{}", RawMutableSpace(m), **t)
}
@@ -456,6 +454,9 @@ impl fmt::Show for clean::Type {
};
write!(f, "&amp;{}{}{}", lt, MutableSpace(mutability), **ty)
}
clean::Unique(..) | clean::Managed(..) => {
fail!("should have been cleaned")
}
}
}
}
@@ -491,7 +492,6 @@ impl<'a> fmt::Show for Method<'a> {
match *selfty {
clean::SelfStatic => {},
clean::SelfValue => args.push_str("self"),
clean::SelfOwned => args.push_str("self: Box<Self>"),
clean::SelfBorrowed(Some(ref lt), mtbl) => {
args.push_str(format!("&amp;{} {}self", *lt,
MutableSpace(mtbl)).as_slice());