Support imports of the form use {foo,bar}

This fixes #10806.
This commit is contained in:
Kevin Ballard
2013-12-04 13:08:42 -08:00
parent 4ab6a0856f
commit bd36b06f55
3 changed files with 66 additions and 2 deletions

View File

@@ -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);
});