rust/crates/ide-assists/src/handlers
Dorian Scheidt 21062f9201 fix: Improve suggested names for extracted variables
When extracting a field expression, if RA was unable to resolve the type of the
field, we would previously fall back to using "var_name" as the variable name.

Now, when the `Expr` being extracted matches a `FieldExpr`, we can use the
`NameRef`'s ident token as a fallback option.

fixes #10035
2022-07-08 18:35:04 -05:00
..
add_explicit_type.rs Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
add_label_to_loop.rs restrict the assist so that it only appears if the cursor is on the loop keyword 2022-06-11 07:11:56 +08:00
add_lifetime_to_type.rs
add_missing_impl_members.rs fix: Insert whitespace into trait-impl completions when coming from macros 2022-05-24 22:56:33 +02:00
add_missing_match_arms.rs
add_return_type.rs
add_turbo_fish.rs
apply_demorgan.rs Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
auto_import.rs Cleanup auto-import ordering 2022-05-28 11:32:07 +02:00
change_visibility.rs
convert_bool_then.rs
convert_comment_block.rs
convert_integer_literal.rs
convert_into_to_from.rs
convert_iter_for_each_to_for.rs internal: Remove unqualified_path completions module 2022-05-05 22:21:42 +02:00
convert_let_else_to_match.rs Simplify const reference check 2022-05-17 11:43:53 -07:00
convert_to_guarded_return.rs
convert_tuple_struct_to_named_struct.rs
convert_while_to_loop.rs
destructure_tuple_binding.rs Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
expand_glob_import.rs internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
extract_function.rs fix: Extract Function misses locals used in closures 2022-07-08 09:52:01 -05:00
extract_module.rs fix(extract_module): Remove redundancy causing else, and also add import fix loop for names 2022-05-31 09:51:42 +05:30
extract_struct_from_enum_variant.rs
extract_type_alias.rs
extract_variable.rs fix: Improve suggested names for extracted variables 2022-07-08 18:35:04 -05:00
fix_visibility.rs
flip_binexpr.rs
flip_comma.rs Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
flip_trait_bound.rs
generate_constant.rs
generate_default_from_enum_variant.rs
generate_default_from_new.rs
generate_delegate_methods.rs
generate_deref.rs Improve "Generate Deref impl" assist 2022-05-16 20:10:46 +02:00
generate_derive.rs Revert the "Add attribute" assist 2022-05-20 14:39:22 +02:00
generate_documentation_template.rs Include self type in generated getter/setter docs 2022-05-18 19:22:04 +02:00
generate_enum_is_method.rs
generate_enum_projection_method.rs
generate_enum_variant.rs Make test pass 2022-05-25 18:31:08 +02:00
generate_from_impl_for_enum.rs
generate_function.rs Better lowercase/uppercase checks 2022-05-22 18:31:12 +02:00
generate_getter.rs Add a "Add attribute" assist 2022-05-17 20:28:25 +02:00
generate_impl.rs
generate_is_empty_from_len.rs internal: Remove unqualified_path completions module 2022-05-05 22:21:42 +02:00
generate_new.rs
generate_setter.rs Don't generate documentation in generate_setter 2022-05-16 19:27:27 +02:00
inline_call.rs
inline_local_variable.rs feat: fix inline variable produce mismatched type 2022-06-04 17:07:28 +08:00
inline_type_alias.rs Fix a couple of weak warnings found by rust-analyzer itself 2022-06-08 14:35:11 +00:00
introduce_named_generic.rs
introduce_named_lifetime.rs
invert_if.rs
merge_imports.rs Allow merging of multiple selected imports. 2022-06-02 23:15:55 +05:00
merge_match_arms.rs
move_bounds.rs
move_from_mod_rs.rs
move_guard.rs minor: Reduce move-guard trigger range 2022-06-03 17:00:03 +02:00
move_module_to_file.rs
move_to_mod_rs.rs
number_representation.rs
promote_local_to_const.rs
pull_assignment_up.rs
qualify_method_call.rs
qualify_path.rs fix: Allow auto importing starting segments of use items 2022-05-07 15:52:22 +02:00
raw_string.rs
remove_dbg.rs Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
remove_mut.rs
remove_unused_param.rs
reorder_fields.rs
reorder_impl_items.rs Remove "Sort methods by trait definition" assist 2022-05-04 00:59:23 +04:00
replace_derive_with_manual_impl.rs
replace_if_let_with_match.rs fix: Fix match to if let assist for wildcard pats 2022-06-05 01:02:24 +02:00
replace_let_with_if_let.rs
replace_qualified_name_with_use.rs
replace_string_with_char.rs
replace_try_expr_with_match.rs
replace_turbofish_with_explicit_type.rs
sort_items.rs
split_import.rs
toggle_ignore.rs
unmerge_use.rs
unnecessary_async.rs
unwrap_block.rs internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
unwrap_result_return_type.rs
wrap_return_type_in_result.rs