]> git.lizzy.rs Git - rust.git/commitdiff
Remove ProcType and ProcExp
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 10 Mar 2015 23:09:42 +0000 (00:09 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 10 Mar 2015 23:09:42 +0000 (00:09 +0100)
src/libsyntax/parse/obsolete.rs
src/libsyntax/parse/parser.rs

index d853fbba8d4bd06ab309f0d5a3fe55ae35aeeaeb..ee646d95f35a42f8f9de737f7beeece3ef8aa37e 100644 (file)
@@ -24,8 +24,6 @@
 pub enum ObsoleteSyntax {
     Sized,
     ForSized,
-    ProcType,
-    ProcExpr,
     ClosureType,
     ClosureKind,
     EmptyIndex,
@@ -57,16 +55,6 @@ fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
                  by default",
                 true,
             ),
-            ObsoleteSyntax::ProcType => (
-                "the `proc` type",
-                "is not used for moment, use unboxed closures instead",
-                true,
-            ),
-            ObsoleteSyntax::ProcExpr => (
-                "`proc` expression",
-                "is not used for the moment, use a `move ||` expression instead",
-                true,
-            ),
             ObsoleteSyntax::ClosureType => (
                 "`|usize| -> bool` closure type",
                 "use unboxed closures instead, no type annotation needed",
index 7535e060c55e6b87f446171f4dbc73334d6464f5..b0ae612d4b0c2b7e9da382259837cc5b4f28efa9 100644 (file)
@@ -1119,35 +1119,6 @@ pub fn parse_ty_bare_fn(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
         }))
     }
 
-    /// Parses a procedure type (`proc`). The initial `proc` keyword must
-    /// already have been parsed.
-    pub fn parse_proc_type(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_ {
-        /*
-
-        proc <'lt> (S) [:Bounds] -> T
-        ^~~^ ^~~~^  ^  ^~~~~~~~^    ^
-         |     |    |      |        |
-         |     |    |      |      Return type
-         |     |    |    Bounds
-         |     |  Argument types
-         |   Legacy lifetimes
-        the `proc` keyword (already consumed)
-
-        */
-
-        let proc_span = self.last_span;
-
-        // To be helpful, parse the proc as ever
-        let _ = self.parse_legacy_lifetime_defs(lifetime_defs);
-        let _ = self.parse_fn_args(false, false);
-        let _ = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Bare);
-        let _ = self.parse_ret_ty();
-
-        self.obsolete(proc_span, ObsoleteSyntax::ProcType);
-
-        TyInfer
-    }
-
     /// Parses an obsolete closure kind (`&:`, `&mut:`, or `:`).
     pub fn parse_obsolete_closure_kind(&mut self) {
          let lo = self.span.lo;