diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-04-27 15:03:30 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-27 16:45:54 -0700 |
| commit | 48368c5a078cacaa554c80af1649b6be96c95227 (patch) | |
| tree | a19bbc592d96ea6c9413df19844d7ffbb91697f3 /src/librustsyntax/parse/parser.rs | |
| parent | bde5a842ce286508e503694b2cac0251600e25be (diff) | |
| download | rust-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.rs | 4 |
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); |
