parent
67e9fe512c
commit
8a7f2e0fe5
2 changed files with 13 additions and 0 deletions
|
|
@ -653,6 +653,11 @@ fn parse_lit(&parser p) -> ast::lit {
|
|||
p.bump();
|
||||
lit = ast::lit_str(p.get_str(s), ast::sk_rc);
|
||||
}
|
||||
case (token::LPAREN) {
|
||||
p.bump();
|
||||
expect(p, token::RPAREN);
|
||||
lit = ast::lit_nil;
|
||||
}
|
||||
case (?t) { unexpected(p, t); }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
8
src/test/run-pass/nil-pattern.rs
Normal file
8
src/test/run-pass/nil-pattern.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// xfail-stage0
|
||||
fn main() {
|
||||
auto x = ();
|
||||
alt (x) {
|
||||
case (()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue