about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2019-09-28 09:15:06 -0700
committerEric Huss <eric@huss.org>2019-09-28 09:15:06 -0700
commitf6ceccea935e2ed7f55109b9a2cc2addfe894dff (patch)
tree70f7b6f47694bcda8c388b5a582c5d3ff88aef7c /src/libsyntax_pos
parentf3c8eba643a815d720e7f20699b3dca144c845c4 (diff)
downloadrust-f6ceccea935e2ed7f55109b9a2cc2addfe894dff.tar.gz
rust-f6ceccea935e2ed7f55109b9a2cc2addfe894dff.zip
Upgrade async/await to "used" keywords.
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 32af930ffb8..44a34070dec 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -83,11 +83,11 @@ symbols! {
         Yield:              "yield",
 
         // Edition-specific keywords that are used in stable Rust.
+        Async:              "async", // >= 2018 Edition only
+        Await:              "await", // >= 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
-        Await:              "await", // >= 2018 Edition only
         Try:                "try", // >= 2018 Edition only
 
         // Special lifetime names
@@ -1088,11 +1088,11 @@ pub mod sym {
 
 impl Symbol {
     fn is_used_keyword_2018(self) -> bool {
-        self == kw::Dyn
+        self >= kw::Async && self <= kw::Dyn
     }
 
     fn is_unused_keyword_2018(self) -> bool {
-        self >= kw::Async && self <= kw::Try
+        self == kw::Try
     }
 
     /// Used for sanity checking rustdoc keyword sections.