Skip to content

Commit 5411cbf

Browse files
committed
remove unused flag to parse_local fn
1 parent 63397b8 commit 5411cbf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,8 +2433,7 @@ pub impl Parser {
24332433
}
24342434

24352435
// parse a local variable declaration
2436-
fn parse_local(&self, is_mutbl: bool,
2437-
allow_init: bool) -> @local {
2436+
fn parse_local(&self, is_mutbl: bool) -> @local {
24382437
let lo = self.span.lo;
24392438
let pat = self.parse_pat(false);
24402439
let mut ty = @Ty {
@@ -2443,7 +2442,7 @@ pub impl Parser {
24432442
span: mk_sp(lo, lo),
24442443
};
24452444
if self.eat(&token::COLON) { ty = self.parse_ty(false); }
2446-
let init = if allow_init { self.parse_initializer() } else { None };
2445+
let init = self.parse_initializer();
24472446
@spanned(
24482447
lo,
24492448
self.last_span.hi,
@@ -2460,9 +2459,9 @@ pub impl Parser {
24602459
fn parse_let(&self) -> @decl {
24612460
let is_mutbl = self.eat_keyword(&~"mut");
24622461
let lo = self.span.lo;
2463-
let mut locals = ~[self.parse_local(is_mutbl, true)];
2462+
let mut locals = ~[self.parse_local(is_mutbl)];
24642463
while self.eat(&token::COMMA) {
2465-
locals.push(self.parse_local(is_mutbl, true));
2464+
locals.push(self.parse_local(is_mutbl));
24662465
}
24672466
return @spanned(lo, self.last_span.hi, decl_local(locals));
24682467
}

0 commit comments

Comments
 (0)