rust-analyzer/crates/ide-diagnostics/src/handlers
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
..
await_outside_of_async.rs feat: Implement diagnostic for await outside of async 2024-08-05 21:47:57 +09:00
break_outside_of_loop.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
expected_function.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
field_shorthand.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
inactive_code.rs Fix unconfigured diagnostic being attached to the wrong file for modules 2024-08-07 15:07:09 +02:00
incoherent_impl.rs move tt-iter into tt crate 2024-06-24 14:47:21 +02:00
incorrect_case.rs feat: Add incorrect case diagnostics for enum variant fields and all variables 2024-07-13 21:54:22 +12:00
invalid_derive_target.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
json_is_not_rust.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
macro_error.rs Resolve included files to their calling modules in IDE layer 2024-08-12 13:45:33 +02:00
malformed_derive.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
mismatched_arg_count.rs Surpress type mismatches in calls with mismatched arg counts 2024-08-05 16:15:28 +02:00
missing_fields.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
missing_match_arms.rs feat: `min-exhaustive-patterns 2024-08-13 23:10:55 +09:00
missing_unsafe.rs fix: Correctly support #[rustc_deprecated_safe_2024] 2024-08-12 10:56:59 +02:00
moved_out_of_ref.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
mutability_errors.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
no_such_field.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
non_exhaustive_let.rs Temporarily remove non-working test case 2024-08-13 23:10:55 +09:00
private_assoc_item.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
private_field.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
remove_trailing_return.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
remove_unnecessary_else.rs Auto merge of #16861 - Veykril:macro-diag-exceptions, r=Veykril 2024-03-17 20:41:40 +00:00
replace_filter_map_next_with_find_map.rs add test case 2024-02-23 21:05:55 +08:00
trait_impl_incorrect_safety.rs internal: Use improved adjusted_display_range for all diagnostics 2024-01-31 09:16:30 +01:00
trait_impl_missing_assoc_item.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
trait_impl_orphan.rs ide-diagnostics: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
trait_impl_redundant_assoc_item.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
type_mismatch.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
typed_hole.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
undeclared_label.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unimplemented_builtin_macro.rs ide-diagnostics: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
unlinked_file.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unreachable_label.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unresolved_assoc_item.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
unresolved_extern_crate.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
unresolved_field.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unresolved_ident.rs Diagnose unresolved self value in path expression 2024-07-06 15:44:12 +02:00
unresolved_import.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
unresolved_macro_call.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unresolved_method.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
unresolved_module.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
unused_variables.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
useless_braces.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00