From bd36b06f555a552b7a66fbc3bd749eb7226be4fa Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 4 Dec 2013 13:08:42 -0800 Subject: Support imports of the form `use {foo,bar}` This fixes #10806. --- src/libsyntax/print/pprust.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/print') 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); }); -- cgit 1.4.1-3-g733a5