Skip to content

Commit

Permalink
rustdoc: render 1-tuples as (T,) instead of (T)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidd committed Jul 11, 2014
1 parent aeab250 commit 3d2fd5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustdoc/html/format.rs
Expand Up @@ -428,7 +428,10 @@ impl fmt::Show for clean::Type {
}
clean::Tuple(ref typs) => {
primitive_link(f, clean::PrimitiveTuple,
format!("({:#})", typs).as_slice())
match typs.as_slice() {
[ref one] => format!("({},)", one),
many => format!("({:#})", many)
}.as_slice())
}
clean::Vector(ref t) => {
primitive_link(f, clean::Slice, format!("[{}]", **t).as_slice())
Expand Down

9 comments on commit 3d2fd5e

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at lucidd@3d2fd5e

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging lucidd/rust/#15474 = 3d2fd5e into auto

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lucidd/rust/#15474 = 3d2fd5e merged ok, testing candidate = e108ffa3

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at lucidd@3d2fd5e

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging lucidd/rust/#15474 = 3d2fd5e into auto

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lucidd/rust/#15474 = 3d2fd5e merged ok, testing candidate = 5d200dd

@bors
Copy link
Contributor

@bors bors commented on 3d2fd5e Jul 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 5d200dd

Please sign in to comment.