about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-18 23:06:29 -0800
committerbors <bors@rust-lang.org>2013-11-18 23:06:29 -0800
commitf4c22f75d46e94985d2fe45c896bde65e991b13d (patch)
treeb811656373ff40c6840da947869871c80eeda43f /src/libsyntax/parse/parser.rs
parentf5f5d5aac762a554850d291165536ba752260303 (diff)
parentf977bedafd657b52fb618cc788cc31f35336270d (diff)
downloadrust-f4c22f75d46e94985d2fe45c896bde65e991b13d.tar.gz
rust-f4c22f75d46e94985d2fe45c896bde65e991b13d.zip
auto merge of #10561 : pcwalton/rust/procify, r=alexcrichton
r? @alexcrichton
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1b2e18f3ca5..2ea6878f4a3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1273,15 +1273,17 @@ impl Parser {
     pub fn parse_box_or_uniq_pointee(&self,
                                      sigil: ast::Sigil,
                                      ctor: &fn(v: mt) -> ty_) -> ty_ {
-        // ~'foo fn() or ~fn() are parsed directly as fn types:
+        // ~'foo fn() or ~fn() are parsed directly as obsolete fn types:
         match *self.token {
             token::LIFETIME(*) => {
                 let lifetime = self.parse_lifetime();
+                self.obsolete(*self.last_span, ObsoleteBoxedClosure);
                 return self.parse_ty_closure(Some(sigil), Some(lifetime));
             }
 
-            token::IDENT(*) => {
+            token::IDENT(*) if sigil == ast::BorrowedSigil => {
                 if self.token_is_old_style_closure_keyword() {
+                    self.obsolete(*self.last_span, ObsoleteBoxedClosure);
                     return self.parse_ty_closure(Some(sigil), None);
                 }
             }