syntax: ViewItemUse no longer contains multiple view paths.

it reflected the obsolete syntax `use a, b, c;` and did not make
past the parser (though it was a non-fatal error so we can continue).
this legacy affected many portions of rustc and rustdoc as well,
so this commit cleans them up altogether.
This commit is contained in:
Kang Seonghoon
2014-04-26 22:33:45 +09:00
parent eea4909a87
commit b03547bac1
15 changed files with 185 additions and 208 deletions

View File

@@ -1995,11 +1995,6 @@ impl<'a> State<'a> {
}
}
pub fn print_view_paths(&mut self,
vps: &[@ast::ViewPath]) -> IoResult<()> {
self.commasep(Inconsistent, vps, |s, &vp| s.print_view_path(vp))
}
pub fn print_view_item(&mut self, item: &ast::ViewItem) -> IoResult<()> {
try!(self.hardbreak_if_not_bol());
try!(self.maybe_print_comment(item.span.lo));
@@ -2017,9 +2012,9 @@ impl<'a> State<'a> {
}
}
ast::ViewItemUse(ref vps) => {
ast::ViewItemUse(ref vp) => {
try!(self.head("use"));
try!(self.print_view_paths(vps.as_slice()));
try!(self.print_view_path(*vp));
}
}
try!(word(&mut self.s, ";"));