summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2013-12-04 13:08:42 -0800
committerKevin Ballard <kevin@sb.org>2013-12-10 23:15:19 -0800
commitbd36b06f555a552b7a66fbc3bd749eb7226be4fa (patch)
tree84b046b2c341996cfba1f1f275009794f529ca2a /src/libsyntax/print/pprust.rs
parent4ab6a0856ff4ce59ae39ce067110446576ab227f (diff)
downloadrust-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.rs8
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);
         });