rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.
This commit is contained in:
parent
4c2245d842
commit
2ef9c01ffc
6 changed files with 87 additions and 25 deletions
|
|
@ -91,6 +91,7 @@ tag pat_ {
|
|||
tag mutability {
|
||||
mut;
|
||||
imm;
|
||||
maybe_mut;
|
||||
}
|
||||
|
||||
tag opacity {
|
||||
|
|
|
|||
|
|
@ -615,6 +615,10 @@ impure fn parse_path(parser p, greed g) -> ast.path {
|
|||
impure fn parse_mutability(parser p) -> ast.mutability {
|
||||
if (p.peek() == token.MUTABLE) {
|
||||
p.bump();
|
||||
if (p.peek() == token.QUES) {
|
||||
p.bump();
|
||||
ret ast.maybe_mut;
|
||||
}
|
||||
ret ast.mut;
|
||||
}
|
||||
ret ast.imm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue