about summary refs log tree commit diff
path: root/src/comp/front
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-03-07 10:02:01 -0800
committerGraydon Hoare <graydon@mozilla.com>2011-03-07 10:02:01 -0800
commit44bceb84a71a2dcf71be1545e595e290f35e1fe1 (patch)
treea9be2f6471b4ffca347c42812cafc76bac449bef /src/comp/front
parent5041944fd2736ad9782df07f792c19dcc97db8f7 (diff)
downloadrust-44bceb84a71a2dcf71be1545e595e290f35e1fe1.tar.gz
rust-44bceb84a71a2dcf71be1545e595e290f35e1fe1.zip
Complain on unexpected native symbol, rather than failing with none-exhaustive match.
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/parser.rs3
1 files changed, 3 insertions, 0 deletions
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);
+        }
     }
 }