Skip to content

Commit 5d200dd

Browse files
committed
auto merge of #15614 : lucidd/rust/#15474, r=alexcrichton
This fixes #15474
2 parents f606234 + 3d2fd5e commit 5d200dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustdoc/html/format.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,10 @@ impl fmt::Show for clean::Type {
431431
}
432432
clean::Tuple(ref typs) => {
433433
primitive_link(f, clean::PrimitiveTuple,
434-
format!("({:#})", typs).as_slice())
434+
match typs.as_slice() {
435+
[ref one] => format!("({},)", one),
436+
many => format!("({:#})", many)
437+
}.as_slice())
435438
}
436439
clean::Vector(ref t) => {
437440
primitive_link(f, clean::Slice, format!("[{}]", **t).as_slice())

0 commit comments

Comments
 (0)