rust/crates/ide_assists/src/handlers
bors[bot] 63427afb69
Merge #9825
9825: Generate default impl when converting #[derive(Default)] to manual impl r=Veykril a=yoshuawuyts

Similar to https://github.com/rust-analyzer/rust-analyzer/pull/9814, but for `#[derive(Default)]`. Thanks!

## Follow-up steps
I've added the tests inside `handlers/replace_derive_with_manual_impl.rs` again, but I'm planning a follow-up PR to extract these to `utils/` so we can share them between assists - and maybe even add another assist just for the purpose of testing these impls (e.g. `generate_default_trait_body`).

The step after _that_ is likely to fill out the remaining traits, so we can make it so whenever RA auto-completes a trait which also can be derived, we provide a default function body.


Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-08-09 16:59:10 +00:00
..
add_explicit_type.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
add_lifetime_to_type.rs
add_missing_impl_members.rs
add_turbo_fish.rs
apply_demorgan.rs
auto_import.rs
change_visibility.rs
convert_bool_then.rs Implement if_to_bool_then assist 2021-08-08 17:56:34 +02:00
convert_comment_block.rs
convert_integer_literal.rs
convert_into_to_from.rs
convert_iter_for_each_to_for.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
convert_tuple_struct_to_named_struct.rs
early_return.rs
expand_glob_import.rs
extract_function.rs Simplify 2021-08-07 22:16:15 +02:00
extract_struct_from_enum_variant.rs
extract_type_alias.rs extract_type_alias extracts generics correctly 2021-08-05 02:54:06 +02:00
extract_variable.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
fill_match_arms.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
fix_visibility.rs
flip_binexpr.rs
flip_comma.rs
flip_trait_bound.rs
generate_default_from_enum_variant.rs
generate_default_from_new.rs
generate_deref.rs
generate_derive.rs
generate_enum_is_method.rs
generate_enum_projection_method.rs
generate_from_impl_for_enum.rs
generate_function.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
generate_getter.rs
generate_impl.rs
generate_is_empty_from_len.rs
generate_new.rs
generate_setter.rs
infer_function_return_type.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
inline_call.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
inline_local_variable.rs
introduce_named_lifetime.rs Allow several samples in "// Assist:" comments. 2021-08-02 19:49:36 +03:00
invert_if.rs Simplify 2021-08-07 22:16:15 +02:00
merge_imports.rs
merge_match_arms.rs
move_bounds.rs
move_guard.rs Simplify 2021-08-07 22:16:15 +02:00
move_module_to_file.rs
pull_assignment_up.rs
qualify_path.rs
raw_string.rs
remove_dbg.rs
remove_mut.rs
remove_unused_param.rs
reorder_fields.rs Allow several samples in "// Assist:" comments. 2021-08-02 19:49:36 +03:00
reorder_impl.rs Allow several samples in "// Assist:" comments. 2021-08-02 19:49:36 +03:00
replace_derive_with_manual_impl.rs move code around 2021-08-09 18:27:01 +02:00
replace_for_loop_with_for_each.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
replace_if_let_with_match.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
replace_impl_trait_with_generic.rs
replace_let_with_if_let.rs Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
replace_qualified_name_with_use.rs
replace_string_with_char.rs
sort_items.rs Update the docs 2021-08-02 20:24:18 +03:00
split_import.rs
toggle_ignore.rs
unmerge_use.rs
unwrap_block.rs
wrap_return_type_in_result.rs