diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-15 16:31:57 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-28 09:51:14 -0700 |
| commit | 5411cbf656b42ef1d8a95e9de1a50bea616f7c56 (patch) | |
| tree | c4d0f70f12063672cd80a7a71b6309011cee5f60 /src/libsyntax | |
| parent | 63397b8519c07a4714830a07368b1b044dbdac4b (diff) | |
| download | rust-5411cbf656b42ef1d8a95e9de1a50bea616f7c56.tar.gz rust-5411cbf656b42ef1d8a95e9de1a50bea616f7c56.zip | |
remove unused flag to parse_local fn
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 11b8e8324c4..b0a400085b1 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2433,8 +2433,7 @@ pub impl Parser { } // parse a local variable declaration - fn parse_local(&self, is_mutbl: bool, - allow_init: bool) -> @local { + fn parse_local(&self, is_mutbl: bool) -> @local { let lo = self.span.lo; let pat = self.parse_pat(false); let mut ty = @Ty { @@ -2443,7 +2442,7 @@ pub impl Parser { span: mk_sp(lo, lo), }; if self.eat(&token::COLON) { ty = self.parse_ty(false); } - let init = if allow_init { self.parse_initializer() } else { None }; + let init = self.parse_initializer(); @spanned( lo, self.last_span.hi, @@ -2460,9 +2459,9 @@ pub impl Parser { fn parse_let(&self) -> @decl { let is_mutbl = self.eat_keyword(&~"mut"); let lo = self.span.lo; - let mut locals = ~[self.parse_local(is_mutbl, true)]; + let mut locals = ~[self.parse_local(is_mutbl)]; while self.eat(&token::COMMA) { - locals.push(self.parse_local(is_mutbl, true)); + locals.push(self.parse_local(is_mutbl)); } return @spanned(lo, self.last_span.hi, decl_local(locals)); } |
