rustdoc: Render Sized? on traits and generics

Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly.

Fix #18515
This commit is contained in:
Tom Jakubowski
2014-11-24 10:14:46 -08:00
parent de94f0affb
commit 59d13820c4
6 changed files with 43 additions and 10 deletions

View File

@@ -94,6 +94,9 @@ impl fmt::Show for clean::Generics {
if i > 0 {
try!(f.write(", ".as_bytes()))
}
if let Some(ref unbound) = tp.default_unbound {
try!(write!(f, "{}? ", unbound));
};
try!(f.write(tp.name.as_bytes()));
if tp.bounds.len() > 0 {