about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-04-09 09:39:48 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-04-15 07:23:04 +0200
commitf598091c055100daa1dc0d9c3f0f0a10209a0a84 (patch)
tree68f4e5d997129a52bf12a3854b1cfca629ba17a2 /src
parentbaebf79057fba32c27c3353aacbd389692a54a0c (diff)
downloadrust-f598091c055100daa1dc0d9c3f0f0a10209a0a84.tar.gz
rust-f598091c055100daa1dc0d9c3f0f0a10209a0a84.zip
Use colon for keyword defs
Diffstat (limited to 'src')
-rw-r--r--src/librustc_macros/src/symbols.rs2
-rw-r--r--src/libsyntax_pos/symbol.rs122
2 files changed, 62 insertions, 62 deletions
diff --git a/src/librustc_macros/src/symbols.rs b/src/librustc_macros/src/symbols.rs
index 15f4d988a1f..169c5e13718 100644
--- a/src/librustc_macros/src/symbols.rs
+++ b/src/librustc_macros/src/symbols.rs
@@ -22,7 +22,7 @@ struct Keyword {
 impl Parse for Keyword {
     fn parse(input: ParseStream<'_>) -> Result<Self> {
         let name = input.parse()?;
-        input.parse::<Token![,]>()?;
+        input.parse::<Token![:]>()?;
         let value = input.parse()?;
         input.parse::<Token![,]>()?;
 
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index a5611d9ab14..c89bccd5afb 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -23,79 +23,79 @@ symbols! {
     Keywords {
         // Special reserved identifiers used internally for elided lifetimes,
         // unnamed method parameters, crate root module, error recovery etc.
-        Invalid,            "",
-        PathRoot,           "{{root}}",
-        DollarCrate,        "$crate",
-        Underscore,         "_",
+        Invalid:            "",
+        PathRoot:           "{{root}}",
+        DollarCrate:        "$crate",
+        Underscore:         "_",
 
         // Keywords that are used in stable Rust.
-        As,                 "as",
-        Box,                "box",
-        Break,              "break",
-        Const,              "const",
-        Continue,           "continue",
-        Crate,              "crate",
-        Else,               "else",
-        Enum,               "enum",
-        Extern,             "extern",
-        False,              "false",
-        Fn,                 "fn",
-        For,                "for",
-        If,                 "if",
-        Impl,               "impl",
-        In,                 "in",
-        Let,                "let",
-        Loop,               "loop",
-        Match,              "match",
-        Mod,                "mod",
-        Move,               "move",
-        Mut,                "mut",
-        Pub,                "pub",
-        Ref,                "ref",
-        Return,             "return",
-        SelfLower,          "self",
-        SelfUpper,          "Self",
-        Static,             "static",
-        Struct,             "struct",
-        Super,              "super",
-        Trait,              "trait",
-        True,               "true",
-        Type,               "type",
-        Unsafe,             "unsafe",
-        Use,                "use",
-        Where,              "where",
-        While,              "while",
+        As:                 "as",
+        Box:                "box",
+        Break:              "break",
+        Const:              "const",
+        Continue:           "continue",
+        Crate:              "crate",
+        Else:               "else",
+        Enum:               "enum",
+        Extern:             "extern",
+        False:              "false",
+        Fn:                 "fn",
+        For:                "for",
+        If:                 "if",
+        Impl:               "impl",
+        In:                 "in",
+        Let:                "let",
+        Loop:               "loop",
+        Match:              "match",
+        Mod:                "mod",
+        Move:               "move",
+        Mut:                "mut",
+        Pub:                "pub",
+        Ref:                "ref",
+        Return:             "return",
+        SelfLower:          "self",
+        SelfUpper:          "Self",
+        Static:             "static",
+        Struct:             "struct",
+        Super:              "super",
+        Trait:              "trait",
+        True:               "true",
+        Type:               "type",
+        Unsafe:             "unsafe",
+        Use:                "use",
+        Where:              "where",
+        While:              "while",
 
         // Keywords that are used in unstable Rust or reserved for future use.
-        Abstract,           "abstract",
-        Become,             "become",
-        Do,                 "do",
-        Final,              "final",
-        Macro,              "macro",
-        Override,           "override",
-        Priv,               "priv",
-        Typeof,             "typeof",
-        Unsized,            "unsized",
-        Virtual,            "virtual",
-        Yield,              "yield",
+        Abstract:           "abstract",
+        Become:             "become",
+        Do:                 "do",
+        Final:              "final",
+        Macro:              "macro",
+        Override:           "override",
+        Priv:               "priv",
+        Typeof:             "typeof",
+        Unsized:            "unsized",
+        Virtual:            "virtual",
+        Yield:              "yield",
 
         // Edition-specific keywords that are used in stable Rust.
-        Dyn,                "dyn", // >= 2018 Edition only
+        Dyn:                "dyn", // >= 2018 Edition only
 
         // Edition-specific keywords that are used in unstable Rust or reserved for future use.
-        Async,              "async", // >= 2018 Edition only
-        Try,                "try", // >= 2018 Edition only
+        Async:              "async", // >= 2018 Edition only
+        Try:                "try", // >= 2018 Edition only
 
         // Special lifetime names
-        UnderscoreLifetime, "'_",
-        StaticLifetime,     "'static",
+        UnderscoreLifetime: "'_",
+        StaticLifetime:     "'static",
 
         // Weak keywords, have special meaning only in specific contexts.
-        Auto,               "auto",
-        Catch,              "catch",
-        Default,            "default",
-        Existential,        "existential",
-        Union,              "union",
+        Auto:               "auto",
+        Catch:              "catch",
+        Default:            "default",
+        Existential:        "existential",
+        Union:              "union",
     }
 
     // Other symbols that can be referred to with syntax_pos::symbols::*