We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Symbol
check_ident_token
1 parent 54c8725 commit c389116Copy full SHA for c389116
src/librustc_lint/builtin.rs
@@ -1439,8 +1439,8 @@ impl KeywordIdents {
1439
{
1440
let next_edition = match cx.sess.edition() {
1441
Edition::Edition2015 => {
1442
- match &ident.as_str()[..] {
1443
- "async" | "await" | "try" => Edition::Edition2018,
+ match ident.name {
+ kw::Async | kw::Await | kw::Try => Edition::Edition2018,
1444
1445
// rust-lang/rust#56327: Conservatively do not
1446
// attempt to report occurrences of `dyn` within
@@ -1454,7 +1454,7 @@ impl KeywordIdents {
1454
// its precise role in the parsed AST and thus are
1455
// assured this is truly an attempt to use it as
1456
// an identifier.
1457
- "dyn" if !under_macro => Edition::Edition2018,
+ kw::Dyn if !under_macro => Edition::Edition2018,
1458
1459
_ => return,
1460
}
0 commit comments