about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2024-08-16 02:36:24 +0300
committerChayim Refael Friedman <chayimfr@gmail.com>2024-08-16 16:46:24 +0300
commit3d6129dccd36d754876672263ace3aa4ce56d655 (patch)
tree3a7c29cc588d653f8538125764f5e1b64abfa930 /tests/codegen/patchable-function-entry
parenta594a2d46b2794a3812f1dd8c140e9084b666520 (diff)
downloadrust-3d6129dccd36d754876672263ace3aa4ce56d655.tar.gz
rust-3d6129dccd36d754876672263ace3aa4ce56d655.zip
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`.
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions