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 {
1439
1439
{
1440
1440
let next_edition = match cx. sess . edition ( ) {
1441
1441
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 ,
1444
1444
1445
1445
// rust-lang/rust#56327: Conservatively do not
1446
1446
// attempt to report occurrences of `dyn` within
@@ -1454,7 +1454,7 @@ impl KeywordIdents {
1454
1454
// its precise role in the parsed AST and thus are
1455
1455
// assured this is truly an attempt to use it as
1456
1456
// an identifier.
1457
- "dyn" if !under_macro => Edition :: Edition2018 ,
1457
+ kw :: Dyn if !under_macro => Edition :: Edition2018 ,
1458
1458
1459
1459
_ => return ,
1460
1460
}
You can’t perform that action at this time.
0 commit comments