File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1439,8 +1439,8 @@ impl KeywordIdents {
14391439 {
14401440 let next_edition = match cx. sess . edition ( ) {
14411441 Edition :: Edition2015 => {
1442- match & ident. as_str ( ) [ .. ] {
1443- "async" | "await" | "try" => Edition :: Edition2018 ,
1442+ match ident. name {
1443+ kw :: Async | kw :: Await | kw :: Try => Edition :: Edition2018 ,
14441444
14451445 // rust-lang/rust#56327: Conservatively do not
14461446 // attempt to report occurrences of `dyn` within
@@ -1454,7 +1454,7 @@ impl KeywordIdents {
14541454 // its precise role in the parsed AST and thus are
14551455 // assured this is truly an attempt to use it as
14561456 // an identifier.
1457- "dyn" if !under_macro => Edition :: Edition2018 ,
1457+ kw :: Dyn if !under_macro => Edition :: Edition2018 ,
14581458
14591459 _ => return ,
14601460 }
You can’t perform that action at this time.
0 commit comments