File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2433,8 +2433,7 @@ pub impl Parser {
2433
2433
}
2434
2434
2435
2435
// 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 {
2438
2437
let lo = self . span . lo ;
2439
2438
let pat = self . parse_pat ( false ) ;
2440
2439
let mut ty = @Ty {
@@ -2443,7 +2442,7 @@ pub impl Parser {
2443
2442
span : mk_sp ( lo, lo) ,
2444
2443
} ;
2445
2444
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 ( ) ;
2447
2446
@spanned (
2448
2447
lo,
2449
2448
self . last_span . hi ,
@@ -2460,9 +2459,9 @@ pub impl Parser {
2460
2459
fn parse_let( & self ) -> @decl {
2461
2460
let is_mutbl = self . eat_keyword ( & ~"mut ");
2462
2461
let lo = self.span.lo;
2463
- let mut locals = ~[self.parse_local(is_mutbl, true )];
2462
+ let mut locals = ~[self.parse_local(is_mutbl)];
2464
2463
while self.eat(&token::COMMA) {
2465
- locals.push(self.parse_local(is_mutbl, true ));
2464
+ locals.push(self.parse_local(is_mutbl));
2466
2465
}
2467
2466
return @spanned(lo, self.last_span.hi, decl_local(locals));
2468
2467
}
You can’t perform that action at this time.
0 commit comments