Skip to content

Commit 7b03fe0

Browse files
committed
---
yaml --- r: 32503 b: refs/heads/dist-snap c: ef9aa80 h: refs/heads/master i: 32501: cd9787e 32499: 9951bc6 32495: 400305f v: v3
1 parent 4e33dcf commit 7b03fe0

File tree

9 files changed

+32
-25
lines changed

9 files changed

+32
-25
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 233e595b617d3eb1fe50b9aba0b4844369d42398
10+
refs/heads/dist-snap: ef9aa80438c61c1080269ca8b379decc96b49dd5
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libsyntax/parse/token.rs

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -411,22 +411,13 @@ fn contextual_keyword_table() -> hashmap<~str, ()> {
411411
fn restricted_keyword_table() -> hashmap<~str, ()> {
412412
let words = str_hash();
413413
let keys = ~[
414-
~"as",
415-
~"assert",
416-
~"break",
417414
~"const", ~"copy",
418-
~"do", ~"drop",
419-
~"else", ~"enum", ~"export", ~"extern",
420-
~"fail", ~"false", ~"fn", ~"for",
421-
~"if", ~"impl", ~"import",
422-
~"let", ~"log", ~"loop",
423-
~"match", ~"mod", ~"move", ~"mut",
424-
~"priv", ~"pub", ~"pure",
425-
~"ref", ~"return",
415+
~"fail", ~"fn",
416+
~"impl",
417+
~"priv", ~"pub",
418+
~"return",
426419
~"struct",
427-
~"true", ~"trait", ~"type",
428-
~"unchecked", ~"unsafe", ~"use",
429-
~"while"
420+
~"unsafe"
430421
];
431422
for keys.each |word| {
432423
words.insert(word, ());
@@ -438,6 +429,19 @@ fn restricted_keyword_table() -> hashmap<~str, ()> {
438429
fn strict_keyword_table() -> hashmap<~str, ()> {
439430
let words = str_hash();
440431
let keys = ~[
432+
~"as", ~"assert",
433+
~"break",
434+
~"do", ~"drop",
435+
~"else", ~"enum", ~"export", ~"extern",
436+
~"false", ~"for",
437+
~"if", ~"import",
438+
~"let", ~"log", ~"loop",
439+
~"match", ~"mod", ~"move", ~"mut",
440+
~"pure",
441+
~"ref",
442+
~"true", ~"trait", ~"type",
443+
~"unchecked", ~"use",
444+
~"while"
441445
];
442446
for keys.each |word| {
443447
words.insert(word, ());
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fn false() { } //~ ERROR found `false` in restricted position
1+
fn false() { } //~ ERROR found `false` in ident position
22
fn main() { }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fn true() { } //~ ERROR found `true` in restricted position
1+
fn true() { } //~ ERROR found `true` in ident position
22
fn main() { }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mod break {
2+
//~^ ERROR found `break` in ident position
3+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// error-pattern:found `let` in restricted position
1+
// error-pattern:found `fail` in restricted position
22

33
fn main() {
44
match true {
5-
{let} { }
5+
{fail} { }
66
}
77
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// error-pattern:found `let` in restricted position
1+
// error-pattern:found `fail` in restricted position
22

33
fn main() {
4-
enum let = int;
4+
enum fail = int;
55
}

branches/dist-snap/src/test/run-pass/module-polymorphism4.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ mod cat {
77
#[path = "cat.rs"]
88
mod inst;
99

10-
#[path = "trait.rs"]
11-
mod trait;
10+
#[path = "trait_.rs"]
11+
mod trait_;
1212

1313
}
1414

@@ -20,7 +20,7 @@ mod dog {
2020
#[path = "dog.rs"]
2121
mod inst;
2222

23-
#[path = "trait.rs"]
24-
mod trait;
23+
#[path = "trait_.rs"]
24+
mod trait_;
2525

2626
}

0 commit comments

Comments
 (0)