diff options
| author | Kevin Ballard <kevin@sb.org> | 2013-12-04 13:08:42 -0800 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2013-12-10 23:15:19 -0800 |
| commit | bd36b06f555a552b7a66fbc3bd749eb7226be4fa (patch) | |
| tree | 84b046b2c341996cfba1f1f275009794f529ca2a /src/libsyntax/print/pprust.rs | |
| parent | 4ab6a0856ff4ce59ae39ce067110446576ab227f (diff) | |
| download | rust-bd36b06f555a552b7a66fbc3bd749eb7226be4fa.tar.gz rust-bd36b06f555a552b7a66fbc3bd749eb7226be4fa.zip | |
Support imports of the form `use {foo,bar}`
This fixes #10806.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index ea382e1cefe..19133fad9ee 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1935,8 +1935,12 @@ pub fn print_view_path(s: @ps, vp: &ast::view_path) { } ast::view_path_list(ref path, ref idents, _) => { - print_path(s, path, false); - word(s.s, "::{"); + if path.segments.is_empty() { + word(s.s, "{"); + } else { + print_path(s, path, false); + word(s.s, "::{"); + } commasep(s, inconsistent, (*idents), |s, w| { print_ident(s, w.node.name); }); |
