From cd54e7772040cd268f911e9dfd088ad5f659f552 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 16 Aug 2011 15:21:30 -0700 Subject: Allow multiple imports in a single statement Like so: import foo::{bar, baz}; Issue #817 --- src/comp/syntax/print/pprust.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/comp/syntax/print') diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 43ab6c5c823..a8f694e6755 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -1267,6 +1267,19 @@ fn print_view_item(s: &ps, item: &@ast::view_item) { word(s.s, elt); } } + ast::view_item_import_from(mod_path, idents, _) { + head(s, "import"); + for elt: str in mod_path { + word(s.s, elt); + word(s.s, "::"); + } + word(s.s, "{"); + commasep(s, inconsistent, idents, + fn(s: &ps, w: &ast::import_ident) { + word(s.s, w.node.name) + }); + word(s.s, "}"); + } ast::view_item_import_glob(ids, _) { head(s, "import"); let first = true; -- cgit 1.4.1-3-g733a5