Commit graph

10 commits

Author SHA1 Message Date
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
Lukas Wirth
2346a80ab4 Remove Name::to_smol_str 2024-07-16 12:43:58 +02:00
Wilfred Hughes
d68e549205 internal: Fix rustdoc warnings
`cargo doc` generates a bunch of warnings on rust-analyzer. Fix all the
bare URL and empty code block warnings.
2024-06-13 17:29:10 -07:00
maxwase
2657078573 Add toggle_async_sugar assist code action 2024-05-24 01:08:21 +03:00
Tavo Annus
125791386d Cleanup term search related changes 2024-02-11 14:35:54 +02:00
Lukas Wirth
15bffe25bd feat: Add break and return postfix keyword completions 2024-02-08 14:56:10 +01:00
Young-Flash
b84940b199 make generate_mut_trait_impl assist trigged for std trait only 2023-11-05 12:27:10 +08:00
Lukas Wirth
bcff166b3a Add ExternCrateDecl to HIR 2023-08-02 11:52:55 +02:00
Jonas Schievink
1df6560fd8 Improve "Generate Deref impl" assist 2022-05-16 20:10:46 +02:00
Peh
1f011fa4a3 style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
Renamed from crates/ide_db/src/famous_defs.rs (Browse further)