about summary refs log tree commit diff
path: root/src/librustsyntax/parse/parser.rs
diff options
context:
space:
mode:
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);