Promote 'const', 'copy', 'fn' to strict keywords

This commit is contained in:
Brian Anderson 2012-09-12 14:51:38 -07:00
parent 7eb10c4ce1
commit 7568dd4564
5 changed files with 22 additions and 18 deletions

View file

@ -414,8 +414,7 @@ fn temporary_keyword_table() -> HashMap<~str, ()> {
fn restricted_keyword_table() -> HashMap<~str, ()> {
let words = str_hash();
let keys = ~[
~"const", ~"copy",
~"fail", ~"fn",
~"fail",
~"unsafe"
];
for keys.each |word| {
@ -430,9 +429,10 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
let keys = ~[
~"as", ~"assert",
~"break",
~"const", ~"copy",
~"do", ~"drop",
~"else", ~"enum", ~"export", ~"extern",
~"false", ~"for",
~"false", ~"fn", ~"for",
~"if", ~"impl",
~"let", ~"log", ~"loop",
~"match", ~"mod", ~"move", ~"mut",