Rename kw::Empty as sym::empty. - #141376
Conversation
Because the empty string is not a keyword.
commented
May 22, 2025
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_ast_lowering/src/format.rs cc @m-ou-se Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
commented
May 22, 2025
|
@petrochenkov: you previously rejected this change (along with
Because of the work I've been doing in #137978, empty identifiers are never stored any more. (There's even an assertion in Also, we no longer rely on |
|
If I'm allowed to give an unsolicited comment, in my head I always map So |
commented
May 22, 2025
|
imo: |
commented
May 22, 2025
|
There are about twenty symbols where the value doesn't match the name. ( I just want |
commented
May 22, 2025
|
I was thinking about #134253 (comment) in the background and did some experiments. The symbols that end up in AST/HIR identifiers, besides actual lexical identifiers are:
So we either need to consistently move some of this stuff to "special identifiers", or just avoid additional entities and put them into |
commented
May 22, 2025
|
In any case r=me on the changes in this PR as well.
|
commented
May 22, 2025
|
@bors r=petrochenkov |
Because the empty string is not a keyword.
r? @petrochenkov