From 44bceb84a71a2dcf71be1545e595e290f35e1fe1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 7 Mar 2011 10:02:01 -0800 Subject: Complain on unexpected native symbol, rather than failing with none-exhaustive match. --- src/comp/front/parser.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 5b677e9b..67eec424 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1836,6 +1836,9 @@ impure fn parse_native_item(parser p) -> @ast.native_item { case (token.FN) { ret parse_item_native_fn(p, eff); } + case (?t) { + unexpected(p, t); + } } } -- cgit v1.2.3