rust-analyzer/crates/ide-ssr/src
Chayim Refael Friedman 9d3368f2c2 Properly account for editions in names
This PR touches a lot of parts. But the main changes are changing
`hir_expand::Name` to be raw edition-dependently and only when necessary
(unrelated to how the user originally wrote the identifier),
and changing `is_keyword()` and `is_raw_identifier()` to be edition-aware
(this was done in #17896, but the FIXMEs were fixed here).

It is possible that I missed some cases, but most IDE parts should properly
escape (or not escape) identifiers now.

The rules of thumb are:

 - If we show the identifier to the user, its rawness should be determined
   by the edition of the edited crate. This is nice for IDE features,
   but really important for changes we insert to the source code.
 - For tests, I chose `Edition::CURRENT` (so we only have to (maybe) update
   tests when an edition becomes stable, to avoid churn).
 - For debugging tools (helper methods and logs), I used `Edition::LATEST`.
2024-08-16 16:46:24 +03:00
..
errors.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
fragments.rs internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros 2024-04-14 16:02:38 +02:00
from_comment.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
lib.rs Simplify FileDelegate 2024-08-05 13:03:03 +02:00
matching.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
nester.rs Run cargo fmt 2022-07-20 15:06:15 +02:00
parsing.rs Add always disabled gen parse support 2024-07-17 10:49:12 +02:00
replacing.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
resolving.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
search.rs Simplify FileDelegate 2024-08-05 13:03:03 +02:00
tests.rs Simplify FileDelegate 2024-08-05 13:03:03 +02:00