about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-05 08:42:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-07-05 08:42:13 -0700
commitfd95db25b367d5d61ee9bc86b928c529747b3622 (patch)
treef93755558c3f91addb568e1f5aa4f2a4799589f5 /src/libsyntax_pos
parentd316874c87e25669895c306658e15aa3746d66ab (diff)
parent692b5722363be2de18a27b46db59950124a5101d (diff)
downloadrust-fd95db25b367d5d61ee9bc86b928c529747b3622.tar.gz
rust-fd95db25b367d5d61ee9bc86b928c529747b3622.zip
Merge remote-tracking branch 'origin/master' into proc_macro_api
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs126
1 files changed, 63 insertions, 63 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 6b5caff27e8..debac70545a 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -237,76 +237,76 @@ macro_rules! declare_keywords {(
 // NB: leaving holes in the ident table is bad! a different ident will get
 // interned with the id from the hole, but it will be between the min and max
 // of the reserved words, and thus tagged as "reserved".
-// After modifying this list adjust `is_strict_keyword`/`is_reserved_keyword`,
+// After modifying this list adjust `is_special_ident`, `is_used_keyword`/`is_unused_keyword`,
 // this should be rarely necessary though if the keywords are kept in alphabetic order.
 declare_keywords! {
-    // Invalid identifier
+    // Special reserved identifiers used internally for elided lifetimes,
+    // unnamed method parameters, crate root module, error recovery etc.
     (0,  Invalid,        "")
-
-    // Strict keywords used in the language.
-    (1,  As,             "as")
-    (2,  Box,            "box")
-    (3,  Break,          "break")
-    (4,  Const,          "const")
-    (5,  Continue,       "continue")
-    (6,  Crate,          "crate")
-    (7,  Else,           "else")
-    (8,  Enum,           "enum")
-    (9,  Extern,         "extern")
-    (10, False,          "false")
-    (11, Fn,             "fn")
-    (12, For,            "for")
-    (13, If,             "if")
-    (14, Impl,           "impl")
-    (15, In,             "in")
-    (16, Let,            "let")
-    (17, Loop,           "loop")
-    (18, Match,          "match")
-    (19, Mod,            "mod")
-    (20, Move,           "move")
-    (21, Mut,            "mut")
-    (22, Pub,            "pub")
-    (23, Ref,            "ref")
-    (24, Return,         "return")
-    (25, SelfValue,      "self")
-    (26, SelfType,       "Self")
-    (27, Static,         "static")
-    (28, Struct,         "struct")
-    (29, Super,          "super")
-    (30, Trait,          "trait")
-    (31, True,           "true")
-    (32, Type,           "type")
-    (33, Unsafe,         "unsafe")
-    (34, Use,            "use")
-    (35, Where,          "where")
-    (36, While,          "while")
+    (1,  CrateRoot,      "{{root}}")
+    (2,  DollarCrate,    "$crate")
+
+    // Keywords used in the language.
+    (3,  As,             "as")
+    (4,  Box,            "box")
+    (5,  Break,          "break")
+    (6,  Const,          "const")
+    (7,  Continue,       "continue")
+    (8,  Crate,          "crate")
+    (9,  Else,           "else")
+    (10, Enum,           "enum")
+    (11, Extern,         "extern")
+    (12, False,          "false")
+    (13, Fn,             "fn")
+    (14, For,            "for")
+    (15, If,             "if")
+    (16, Impl,           "impl")
+    (17, In,             "in")
+    (18, Let,            "let")
+    (19, Loop,           "loop")
+    (20, Match,          "match")
+    (21, Mod,            "mod")
+    (22, Move,           "move")
+    (23, Mut,            "mut")
+    (24, Pub,            "pub")
+    (25, Ref,            "ref")
+    (26, Return,         "return")
+    (27, SelfValue,      "self")
+    (28, SelfType,       "Self")
+    (29, Static,         "static")
+    (30, Struct,         "struct")
+    (31, Super,          "super")
+    (32, Trait,          "trait")
+    (33, True,           "true")
+    (34, Type,           "type")
+    (35, Unsafe,         "unsafe")
+    (36, Use,            "use")
+    (37, Where,          "where")
+    (38, While,          "while")
 
     // Keywords reserved for future use.
-    (37, Abstract,       "abstract")
-    (38, Alignof,        "alignof")
-    (39, Become,         "become")
-    (40, Do,             "do")
-    (41, Final,          "final")
-    (42, Macro,          "macro")
-    (43, Offsetof,       "offsetof")
-    (44, Override,       "override")
-    (45, Priv,           "priv")
-    (46, Proc,           "proc")
-    (47, Pure,           "pure")
-    (48, Sizeof,         "sizeof")
-    (49, Typeof,         "typeof")
-    (50, Unsized,        "unsized")
-    (51, Virtual,        "virtual")
-    (52, Yield,          "yield")
+    (39, Abstract,       "abstract")
+    (40, Alignof,        "alignof")
+    (41, Become,         "become")
+    (42, Do,             "do")
+    (43, Final,          "final")
+    (44, Macro,          "macro")
+    (45, Offsetof,       "offsetof")
+    (46, Override,       "override")
+    (47, Priv,           "priv")
+    (48, Proc,           "proc")
+    (49, Pure,           "pure")
+    (50, Sizeof,         "sizeof")
+    (51, Typeof,         "typeof")
+    (52, Unsized,        "unsized")
+    (53, Virtual,        "virtual")
+    (54, Yield,          "yield")
 
     // Weak keywords, have special meaning only in specific contexts.
-    (53, Default,        "default")
-    (54, StaticLifetime, "'static")
-    (55, Union,          "union")
-    (56, Catch,          "catch")
-
-    // A virtual keyword that resolves to the crate root when used in a lexical scope.
-    (57, CrateRoot, "{{root}}")
+    (55, Default,        "default")
+    (56, StaticLifetime, "'static")
+    (57, Union,          "union")
+    (58, Catch,          "catch")
 }
 
 // If an interner exists in TLS, return it. Otherwise, prepare a fresh one.