We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67e9fe5 commit 8a7f2e0Copy full SHA for 8a7f2e0
src/comp/syntax/parse/parser.rs
@@ -653,6 +653,11 @@ fn parse_lit(&parser p) -> ast::lit {
653
p.bump();
654
lit = ast::lit_str(p.get_str(s), ast::sk_rc);
655
}
656
+ case (token::LPAREN) {
657
+ p.bump();
658
+ expect(p, token::RPAREN);
659
+ lit = ast::lit_nil;
660
+ }
661
case (?t) { unexpected(p, t); }
662
663
src/test/run-pass/nil-pattern.rs
@@ -0,0 +1,8 @@
1
+// xfail-stage0
2
+fn main() {
3
+ auto x = ();
4
+ alt (x) {
5
+ case (()) {
6
7
8
+}
0 commit comments