about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKang Seonghoon <public+git@mearie.org>2014-04-26 22:33:45 +0900
committerKang Seonghoon <public+git@mearie.org>2014-04-26 22:33:45 +0900
commitb03547bac1301da0a053e1e73a591ebdb0ccd1ca (patch)
tree4548245ecf0084513ef81ac742441400cb363878 /src/libsyntax/parse
parenteea4909a8713a54b3c47e871a70baf6c722999a3 (diff)
downloadrust-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/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 974077956d1..88110a87e6c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4918,12 +4918,12 @@ impl<'a> Parser<'a> {
     }
 
     // matches view_paths = view_path | view_path , view_paths
-    fn parse_view_paths(&mut self) -> Vec<@ViewPath> {
-        let mut vp = vec!(self.parse_view_path());
+    fn parse_view_paths(&mut self) -> @ViewPath {
+        let vp = self.parse_view_path();
         while self.token == token::COMMA {
             self.bump();
             self.obsolete(self.last_span, ObsoleteMultipleImport);
-            vp.push(self.parse_view_path());
+            let _ = self.parse_view_path();
         }
         return vp;
     }