Skip to content

Commit 63397b8

Browse files
committed
remove unused RESTRICT_NO_CALL_EXPRS restriction
1 parent 2733a1f commit 63397b8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ use core::vec;
9898
enum restriction {
9999
UNRESTRICTED,
100100
RESTRICT_STMT_EXPR,
101-
RESTRICT_NO_CALL_EXPRS,
102101
RESTRICT_NO_BAR_OP,
103102
RESTRICT_NO_BAR_OR_DOUBLEBAR_OP,
104103
}
@@ -1377,10 +1376,6 @@ pub impl Parser {
13771376
self.parse_dot_or_call_expr_with(b)
13781377
}
13791378

1380-
fn permits_call(&self) -> bool {
1381-
return *self.restriction != RESTRICT_NO_CALL_EXPRS;
1382-
}
1383-
13841379
fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr {
13851380
let mut e = e0;
13861381
let lo = e.span.lo;
@@ -1401,7 +1396,7 @@ pub impl Parser {
14011396

14021397
// expr.f() method call
14031398
match *self.token {
1404-
token::LPAREN if self.permits_call() => {
1399+
token::LPAREN => {
14051400
let es = self.parse_unspanned_seq(
14061401
&token::LPAREN,
14071402
&token::RPAREN,
@@ -1425,7 +1420,7 @@ pub impl Parser {
14251420
if self.expr_is_complete(e) { break; }
14261421
match *self.token {
14271422
// expr(...)
1428-
token::LPAREN if self.permits_call() => {
1423+
token::LPAREN => {
14291424
let es = self.parse_unspanned_seq(
14301425
&token::LPAREN,
14311426
&token::RPAREN,

0 commit comments

Comments
 (0)