diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-02-18 17:45:56 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-02-18 17:45:56 -0800 |
| commit | aa284de1fc246b55fb53783ded3e9786e04b03d0 (patch) | |
| tree | 77cbec33ccd8c2af2c2888b5cf2c60499db1d32e /src/libsyntax/print | |
| parent | 612553cb3921f428668602afda1b106e0fd54d73 (diff) | |
| download | rust-aa284de1fc246b55fb53783ded3e9786e04b03d0.tar.gz rust-aa284de1fc246b55fb53783ded3e9786e04b03d0.zip | |
rustc: For one-tuples, make parsing and printing the type work
and add a test to reflect-visit-data
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 8f2ad6ecb90..ccb3947f834 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -414,6 +414,9 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) { ast::ty_tup(elts) => { popen(s); commasep(s, inconsistent, elts, print_type); + if elts.len() == 1 { + word(s.s, ~","); + } pclose(s); } ast::ty_bare_fn(f) => { |
