From b03547bac1301da0a053e1e73a591ebdb0ccd1ca Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Sat, 26 Apr 2014 22:33:45 +0900 Subject: 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. --- src/libsyntax/ext/build.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 1a160cb33aa..dbf3c75401c 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -246,7 +246,7 @@ pub trait AstBuilder { -> @ast::MetaItem; fn view_use(&self, sp: Span, - vis: ast::Visibility, vp: Vec<@ast::ViewPath> ) -> ast::ViewItem; + vis: ast::Visibility, vp: @ast::ViewPath) -> ast::ViewItem; fn view_use_simple(&self, sp: Span, vis: ast::Visibility, path: ast::Path) -> ast::ViewItem; fn view_use_simple_(&self, sp: Span, vis: ast::Visibility, ident: ast::Ident, path: ast::Path) -> ast::ViewItem; @@ -949,7 +949,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } fn view_use(&self, sp: Span, - vis: ast::Visibility, vp: Vec<@ast::ViewPath> ) -> ast::ViewItem { + vis: ast::Visibility, vp: @ast::ViewPath) -> ast::ViewItem { ast::ViewItem { node: ast::ViewItemUse(vp), attrs: Vec::new(), @@ -966,10 +966,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> { fn view_use_simple_(&self, sp: Span, vis: ast::Visibility, ident: ast::Ident, path: ast::Path) -> ast::ViewItem { self.view_use(sp, vis, - vec!(@respan(sp, - ast::ViewPathSimple(ident, - path, - ast::DUMMY_NODE_ID)))) + @respan(sp, + ast::ViewPathSimple(ident, + path, + ast::DUMMY_NODE_ID))) } fn view_use_list(&self, sp: Span, vis: ast::Visibility, @@ -979,17 +979,17 @@ impl<'a> AstBuilder for ExtCtxt<'a> { }).collect(); self.view_use(sp, vis, - vec!(@respan(sp, - ast::ViewPathList(self.path(sp, path), - imports, - ast::DUMMY_NODE_ID)))) + @respan(sp, + ast::ViewPathList(self.path(sp, path), + imports, + ast::DUMMY_NODE_ID))) } fn view_use_glob(&self, sp: Span, vis: ast::Visibility, path: Vec ) -> ast::ViewItem { self.view_use(sp, vis, - vec!(@respan(sp, - ast::ViewPathGlob(self.path(sp, path), ast::DUMMY_NODE_ID)))) + @respan(sp, + ast::ViewPathGlob(self.path(sp, path), ast::DUMMY_NODE_ID))) } } -- cgit 1.4.1-3-g733a5