Skip to content

Commit a07945d

Browse files
Remove ProcType and ProcExp
1 parent 4e877ad commit a07945d

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

src/libsyntax/parse/obsolete.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ use ptr::P;
2424
pub enum ObsoleteSyntax {
2525
Sized,
2626
ForSized,
27-
ProcType,
28-
ProcExpr,
2927
ClosureType,
3028
ClosureKind,
3129
EmptyIndex,
@@ -57,16 +55,6 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
5755
by default",
5856
true,
5957
),
60-
ObsoleteSyntax::ProcType => (
61-
"the `proc` type",
62-
"is not used for moment, use unboxed closures instead",
63-
true,
64-
),
65-
ObsoleteSyntax::ProcExpr => (
66-
"`proc` expression",
67-
"is not used for the moment, use a `move ||` expression instead",
68-
true,
69-
),
7058
ObsoleteSyntax::ClosureType => (
7159
"`|usize| -> bool` closure type",
7260
"use unboxed closures instead, no type annotation needed",

src/libsyntax/parse/parser.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,35 +1119,6 @@ impl<'a> Parser<'a> {
11191119
}))
11201120
}
11211121

1122-
/// Parses a procedure type (`proc`). The initial `proc` keyword must
1123-
/// already have been parsed.
1124-
pub fn parse_proc_type(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_ {
1125-
/*
1126-
1127-
proc <'lt> (S) [:Bounds] -> T
1128-
^~~^ ^~~~^ ^ ^~~~~~~~^ ^
1129-
| | | | |
1130-
| | | | Return type
1131-
| | | Bounds
1132-
| | Argument types
1133-
| Legacy lifetimes
1134-
the `proc` keyword (already consumed)
1135-
1136-
*/
1137-
1138-
let proc_span = self.last_span;
1139-
1140-
// To be helpful, parse the proc as ever
1141-
let _ = self.parse_legacy_lifetime_defs(lifetime_defs);
1142-
let _ = self.parse_fn_args(false, false);
1143-
let _ = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Bare);
1144-
let _ = self.parse_ret_ty();
1145-
1146-
self.obsolete(proc_span, ObsoleteSyntax::ProcType);
1147-
1148-
TyInfer
1149-
}
1150-
11511122
/// Parses an obsolete closure kind (`&:`, `&mut:`, or `:`).
11521123
pub fn parse_obsolete_closure_kind(&mut self) {
11531124
let lo = self.span.lo;

0 commit comments

Comments
 (0)