mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 14:25:24 +00:00
parent
67e9fe512c
commit
8a7f2e0fe5
@ -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…
Reference in New Issue
Block a user