Skip to content

Commit 94cd298

Browse files
committed
rustc: Parse T[mutable?]
1 parent d90ad44 commit 94cd298

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/comp/front/parser.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ fn parse_ty_postfix(@ast::ty orig_t, &parser p) -> @ast::ty {
418418

419419
auto mut;
420420
if (eat_word(p, "mutable")) {
421-
mut = ast::mut;
421+
if (p.peek() == token::QUES) {
422+
p.bump();
423+
mut = ast::maybe_mut;
424+
} else {
425+
mut = ast::mut;
426+
}
422427
} else {
423428
mut = ast::imm;
424429
}

0 commit comments

Comments
 (0)