Skip to content

Commit 44bceb8

Browse files
committed
Complain on unexpected native symbol, rather than failing with none-exhaustive match.
1 parent 5041944 commit 44bceb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/comp/front/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,9 @@ impure fn parse_native_item(parser p) -> @ast.native_item {
18361836
case (token.FN) {
18371837
ret parse_item_native_fn(p, eff);
18381838
}
1839+
case (?t) {
1840+
unexpected(p, t);
1841+
}
18391842
}
18401843
}
18411844

0 commit comments

Comments
 (0)