diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-10 14:33:36 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-02-10 14:33:36 +0100 |
| commit | fe8a31e56992a712b532350596af05186ac90613 (patch) | |
| tree | a8e76aef4b0762dd74511a7457db0143e45e5d0f /src/comp/syntax/parse | |
| parent | 107f827b537a4c3b2a44993085609497a1871928 (diff) | |
| download | rust-fe8a31e56992a712b532350596af05186ac90613.tar.gz rust-fe8a31e56992a712b532350596af05186ac90613.zip | |
Remove a vestige of return-by-reference
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 8ef68ca6388..d6c6a5edb96 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1511,18 +1511,12 @@ fn parse_pat(p: parser) -> @ast::pat { } } else if is_plain_ident(p) && alt p.look_ahead(1u) { - token::LPAREN | token::LBRACKET | - token::LT { - false - } + token::LPAREN | token::LBRACKET | token::LT { false } _ { true } } { let name = parse_path(p); - let sub = if eat(p, token::AT) { - some(parse_pat(p)) - } else { - none - }; + let sub = if eat(p, token::AT) { some(parse_pat(p)) } + else { none }; pat = ast::pat_ident(name, sub); } else { let enum_path = parse_path_and_ty_param_substs(p, true); @@ -1563,17 +1557,10 @@ fn parse_local(p: parser, allow_init: bool) -> @ast::local { } fn parse_let(p: parser) -> @ast::decl { - fn parse_let_style(p: parser) -> ast::let_style { - if eat(p, token::BINOP(token::AND)) { - ast::let_ref - } else { - ast::let_copy - } - } let lo = p.span.lo; - let locals = [(parse_let_style(p), parse_local(p, true))]; + let locals = [parse_local(p, true)]; while eat(p, token::COMMA) { - locals += [(parse_let_style(p), parse_local(p, true))]; + locals += [parse_local(p, true)]; } ret @spanned(lo, p.last_span.hi, ast::decl_local(locals)); } |
