File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ pub enum ObsoleteSyntax {
4444 ObsoleteVecDotDotWildcard ,
4545 ObsoleteBoxedClosure ,
4646 ObsoleteClosureType ,
47+ ObsoleteMultipleImport ,
4748}
4849
4950impl to_bytes:: IterBytes for ObsoleteSyntax {
@@ -140,6 +141,10 @@ impl ParserObsoleteMethods for Parser {
140141 "closures are now written `|A| -> B` rather than `&fn(A) -> \
141142 B`."
142143 ) ,
144+ ObsoleteMultipleImport => (
145+ "multiple imports" ,
146+ "only one import is allowed per `use` statement"
147+ ) ,
143148 } ;
144149
145150 self . report ( sp, kind, kind_str, desc) ;
Original file line number Diff line number Diff line change @@ -4923,6 +4923,7 @@ impl Parser {
49234923 let mut vp = ~[ self . parse_view_path ( ) ] ;
49244924 while * self . token == token:: COMMA {
49254925 self . bump ( ) ;
4926+ self . obsolete ( * self . last_span , ObsoleteMultipleImport ) ;
49264927 vp. push ( self . parse_view_path ( ) ) ;
49274928 }
49284929 return vp;
You can’t perform that action at this time.
0 commit comments