libsyntax: Remove the old-style borrowed closure type syntax from the

language.
This commit is contained in:
Patrick Walton
2013-11-19 18:15:10 -08:00
parent 9e610573ba
commit 6801bc8f55
15 changed files with 32 additions and 23 deletions

View File

@@ -1286,7 +1286,7 @@ impl Parser {
return self.parse_ty_closure(Some(sigil), Some(lifetime));
}
token::IDENT(*) if sigil == ast::BorrowedSigil => {
token::IDENT(*) => {
if self.token_is_old_style_closure_keyword() {
self.obsolete(*self.last_span, ObsoleteBoxedClosure);
return self.parse_ty_closure(Some(sigil), None);
@@ -1311,6 +1311,7 @@ impl Parser {
let opt_lifetime = self.parse_opt_lifetime();
if self.token_is_old_style_closure_keyword() {
self.obsolete(*self.last_span, ObsoleteClosureType);
return self.parse_ty_closure(Some(BorrowedSigil), opt_lifetime);
}