From 30a86cf5bb35babcfa0a12911548716b9519bc59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 9 Apr 2019 09:39:48 +0200 Subject: [PATCH] Use colon for keyword defs --- src/librustc_macros/src/symbols.rs | 2 +- src/libsyntax_pos/symbol.rs | 122 ++++++++++++++--------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/librustc_macros/src/symbols.rs b/src/librustc_macros/src/symbols.rs index 15f4d988a1f65..169c5e1371833 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 { let name = input.parse()?; - input.parse::()?; + input.parse::()?; let value = input.parse()?; input.parse::()?; diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index a6ca3354d2636..2c9df9a2bf0e5 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::*