about summary refs log tree commit diff
path: root/src/librustsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-04-27 15:03:30 -0700
committerBrian Anderson <banderson@mozilla.com>2012-04-27 16:45:54 -0700
commit48368c5a078cacaa554c80af1649b6be96c95227 (patch)
treea19bbc592d96ea6c9413df19844d7ffbb91697f3 /src/librustsyntax/parse/parser.rs
parentbde5a842ce286508e503694b2cac0251600e25be (diff)
downloadrust-48368c5a078cacaa554c80af1649b6be96c95227.tar.gz
rust-48368c5a078cacaa554c80af1649b6be96c95227.zip
test: Add test for two restricted keyword cases
Diffstat (limited to 'src/librustsyntax/parse/parser.rs')
-rw-r--r--src/librustsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs
index 8731af4ca60..7e9a3860454 100644
--- a/src/librustsyntax/parse/parser.rs
+++ b/src/librustsyntax/parse/parser.rs
@@ -1395,7 +1395,7 @@ fn parse_pat(p: parser) -> @ast::pat {
                 subpat = parse_pat(p);
             } else {
                 if is_restricted_keyword(p, fieldname) {
-                    p.fatal("found " + fieldname + " in binding position");
+                    p.fatal("found `" + fieldname + "` in binding position");
                 }
                 subpat = @{id: p.get_id(),
                            node: ast::pat_ident(fieldpath, none),
@@ -2149,7 +2149,7 @@ fn parse_item_enum(p: parser, attrs: [ast::attribute]) -> @ast::item {
     // Newtype syntax
     if p.token == token::EQ {
         if is_restricted_keyword(p, id) {
-            p.fatal("found " + id + " in enum constructor position");
+            p.fatal("found `" + id + "` in enum constructor position");
         }
         p.bump();
         let ty = parse_ty(p, false);