diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-06-16 15:17:06 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-06-16 15:17:06 -0700 |
| commit | 94cd2985b267dd8462f2518c5d9109b4e0f71402 (patch) | |
| tree | 33ba34b65803d9d61cb41d3b5c0556185f3caf91 /src/comp | |
| parent | d90ad442b412448f66e7f4401f1d26d9f2e66454 (diff) | |
| download | rust-94cd2985b267dd8462f2518c5d9109b4e0f71402.tar.gz rust-94cd2985b267dd8462f2518c5d9109b4e0f71402.zip | |
rustc: Parse T[mutable?]
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/front/parser.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 08344832678..4e694a112dc 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -418,7 +418,12 @@ fn parse_ty_postfix(@ast::ty orig_t, &parser p) -> @ast::ty { auto mut; if (eat_word(p, "mutable")) { - mut = ast::mut; + if (p.peek() == token::QUES) { + p.bump(); + mut = ast::maybe_mut; + } else { + mut = ast::mut; + } } else { mut = ast::imm; } |
