rust-analyzer/crates/ide-completion/src/tests
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
..
attribute.rs Complete exported macros in #[macro_use($0)] 2023-12-16 16:19:58 +00:00
expression.rs fix(completion): complete async keyword 2024-06-19 11:12:24 -07:00
flyimport.rs fix: Allow flyimport to import primitive shadowing modules 2024-07-21 13:26:19 +02:00
fn_param.rs fix: variants rendering in pattern path 2022-07-02 20:31:24 +09:00
item.rs feat: add space after specific keywords in completion 2024-06-16 17:28:53 +08:00
item_list.rs Add test in ide-completion/src/tests/item_list.rs 2024-07-29 20:40:51 +08:00
pattern.rs fix: pattern completions in let-stmt 2024-06-23 22:27:54 +08:00
predicate.rs Add inlay hints lifetime arg tests 2024-04-25 09:10:49 +02:00
proc_macros.rs feat: Add break and return postfix keyword completions 2024-02-08 14:56:10 +01:00
raw_identifiers.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
record.rs feat: add space after specific keywords in completion 2024-06-16 17:28:53 +08:00
special.rs fix(completion): complete async keyword 2024-06-19 11:12:24 -07:00
type_pos.rs Add inlay hints lifetime arg tests 2024-04-25 09:10:49 +02:00
use_tree.rs add use_tree_completion test 2024-01-18 17:35:01 +08:00
visibility.rs fix(completion): super:: completion at crate root and module depth 2022-07-14 17:07:43 +05:30