Rename kw::Empty as sym::empty.

Because the empty string is not a keyword.
This commit is contained in:
Nicholas Nethercote
2025-05-22 11:55:22 +10:00
parent bf64d66bd5
commit 849cabf4c4
9 changed files with 31 additions and 32 deletions

View File

@@ -85,7 +85,7 @@ impl From<Ident> for LifetimeSyntax {
fn from(ident: Ident) -> Self {
let name = ident.name;
if name == kw::Empty {
if name == sym::empty {
unreachable!("A lifetime name should never be empty");
} else if name == kw::UnderscoreLifetime {
LifetimeSyntax::Anonymous