From 44bceb84a71a2dcf71be1545e595e290f35e1fe1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 7 Mar 2011 10:02:01 -0800 Subject: [PATCH] Complain on unexpected native symbol, rather than failing with none-exhaustive match. --- src/comp/front/parser.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 5b677e9bef2..67eec424213 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); + } } }