Skip to content

Commit ae3bed9

Browse files
committed
---
yaml --- r: 15676 b: refs/heads/try c: 48368c5 h: refs/heads/master v: v3
1 parent de5b672 commit ae3bed9

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: bde5a842ce286508e503694b2cac0251600e25be
5+
refs/heads/try: 48368c5a078cacaa554c80af1649b6be96c95227
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/librustsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ fn parse_pat(p: parser) -> @ast::pat {
13951395
subpat = parse_pat(p);
13961396
} else {
13971397
if is_restricted_keyword(p, fieldname) {
1398-
p.fatal("found " + fieldname + " in binding position");
1398+
p.fatal("found `" + fieldname + "` in binding position");
13991399
}
14001400
subpat = @{id: p.get_id(),
14011401
node: ast::pat_ident(fieldpath, none),
@@ -2149,7 +2149,7 @@ fn parse_item_enum(p: parser, attrs: [ast::attribute]) -> @ast::item {
21492149
// Newtype syntax
21502150
if p.token == token::EQ {
21512151
if is_restricted_keyword(p, id) {
2152-
p.fatal("found " + id + " in enum constructor position");
2152+
p.fatal("found `" + id + "` in enum constructor position");
21532153
}
21542154
p.bump();
21552155
let ty = parse_ty(p, false);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// error-pattern:found `let` in binding position
2+
3+
fn main() {
4+
alt true {
5+
{let} { }
6+
}
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// error-pattern:found `let` in enum constructor position
2+
3+
fn main() {
4+
enum let = int;
5+
}

0 commit comments

Comments
 (0)