diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:33:45 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:33:45 +0900 |
| commit | b03547bac1301da0a053e1e73a591ebdb0ccd1ca (patch) | |
| tree | 4548245ecf0084513ef81ac742441400cb363878 /src/libsyntax/ext | |
| parent | eea4909a8713a54b3c47e871a70baf6c722999a3 (diff) | |
| download | rust-b03547bac1301da0a053e1e73a591ebdb0ccd1ca.tar.gz rust-b03547bac1301da0a053e1e73a591ebdb0ccd1ca.zip | |
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.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 24 |
1 files changed, 12 insertions, 12 deletions
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::Ident> ) -> 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))) } } |
