rollup merge of #19272: tomjakubowski/rustdoc-sized

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

Fix #18515
This commit is contained in:
Alex Crichton
2014-11-26 09:44:18 -08:00
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 {