parent
487e58cca2
commit
e2fa3c3af7
@ -44,6 +44,7 @@ pub enum ObsoleteSyntax {
|
||||
ObsoleteVecDotDotWildcard,
|
||||
ObsoleteBoxedClosure,
|
||||
ObsoleteClosureType,
|
||||
ObsoleteMultipleImport,
|
||||
}
|
||||
|
||||
impl to_bytes::IterBytes for ObsoleteSyntax {
|
||||
@ -140,6 +141,10 @@ fn obsolete(&self, sp: Span, kind: ObsoleteSyntax) {
|
||||
"closures are now written `|A| -> B` rather than `&fn(A) -> \
|
||||
B`."
|
||||
),
|
||||
ObsoleteMultipleImport => (
|
||||
"multiple imports",
|
||||
"only one import is allowed per `use` statement"
|
||||
),
|
||||
};
|
||||
|
||||
self.report(sp, kind, kind_str, desc);
|
||||
|
@ -4923,6 +4923,7 @@ fn parse_view_paths(&self) -> ~[@view_path] {
|
||||
let mut vp = ~[self.parse_view_path()];
|
||||
while *self.token == token::COMMA {
|
||||
self.bump();
|
||||
self.obsolete(*self.last_span, ObsoleteMultipleImport);
|
||||
vp.push(self.parse_view_path());
|
||||
}
|
||||
return vp;
|
||||
|
Loading…
Reference in New Issue
Block a user