diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-01-22 23:33:13 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-01-22 23:34:34 -0800 |
| commit | a7eaa1f5e42b01e3f69b0851178e7a2f253f5ca9 (patch) | |
| tree | 150489175076654754ed6ea756c1a6849e396ff3 /src/libsyntax/parse | |
| parent | 800b8a759d7d22de9ff49a5bd680f36407123298 (diff) | |
| download | rust-a7eaa1f5e42b01e3f69b0851178e7a2f253f5ca9.tar.gz rust-a7eaa1f5e42b01e3f69b0851178e7a2f253f5ca9.zip | |
syntax: Allow closure args to be mutable
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6d4f638393c..61105f6297d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -747,6 +747,7 @@ impl Parser { fn parse_fn_block_arg() -> arg_or_capture_item { do self.parse_capture_item_or |p| { let m = p.parse_arg_mode(); + let is_mutbl = self.eat_keyword(~"mut"); let pat = p.parse_pat(false); let t = if p.eat(token::COLON) { p.parse_ty(false) @@ -759,7 +760,7 @@ impl Parser { }; either::Left(ast::arg { mode: m, - is_mutbl: false, + is_mutbl: is_mutbl, ty: t, pat: pat, id: p.get_id() |
