rust/crates/ide-assists/src/handlers
bors 7ca45dcf04 Auto merge of - alibektas:15240/invalid-demorgan, r=Veykril
internal : rewrite DeMorgan assist

fixes  ,  . This PR is a rewrite of the DeMorgan assist that essentially rids of all the string manipulation and modifies syntax trees to apply demorgan on a binary expr. The main reason for the rewrite is that I wanted to use `Expr::needs_parens_in` method to see if the expr on which the assist is applied would still need the parens it had once the parent expression's operator had equal precedence with that of the expression. I used `.clone_(subtree|for_update)` left and right and probably more than I should have, so I would also be happy to hear how I could have prevented redundant cloning.
2023-08-15 07:29:28 +00:00
..
add_braces.rs fixes 2023-01-21 23:42:11 +05:30
add_explicit_type.rs Add flag to disallow opaque types for DisplayTarget::SourceCode 2023-04-12 19:03:48 +09:00
add_label_to_loop.rs
add_lifetime_to_type.rs
add_missing_impl_members.rs HiddenDocAttr becomes DocHiddenAttr 2023-07-07 14:15:15 +02:00
add_missing_match_arms.rs Don't provide add_missing_match_arms assist when upmapping match arm list failed 2023-07-27 16:43:01 +09:00
add_return_type.rs fix some typos 2023-05-01 14:53:25 +08:00
add_turbo_fish.rs Add ExternCrateDecl to HIR 2023-08-02 11:52:55 +02:00
apply_demorgan.rs Rewrite DeMorgan v2 2023-08-08 15:54:58 +02:00
auto_import.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
change_visibility.rs limit change_visibility assist to applicable items 2023-07-22 17:16:51 +03:00
convert_bool_then.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
convert_comment_block.rs Convert pub to pub(crate) 2023-01-12 09:54:48 +01:00
convert_integer_literal.rs
convert_into_to_from.rs
convert_iter_for_each_to_for.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
convert_let_else_to_match.rs Simplify 2023-03-28 16:32:26 +02:00
convert_match_to_let_else.rs Simplify 2023-03-28 16:32:26 +02:00
convert_named_struct_to_tuple_struct.rs Deunwrap convert_named_struct_to_tuple_struct 2023-08-09 16:40:23 +02:00
convert_nested_function_to_closure.rs Address another round of review comments 2023-04-05 18:48:21 +02:00
convert_to_guarded_return.rs minor : Deunwrap convert_to_guarded_return 2023-08-09 17:17:43 +02:00
convert_tuple_struct_to_named_struct.rs Add render configs for memory layout hovers 2023-05-30 18:36:06 +02:00
convert_two_arm_bool_match_to_matches_macro.rs Allow match to matches assist to trigger on non-literal bool arms 2023-08-01 12:10:38 +02:00
convert_while_to_loop.rs
destructure_tuple_binding.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
desugar_doc_comment.rs Format let-else 2023-07-03 20:34:09 +02:00
expand_glob_import.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
extract_expressions_from_format_string.rs docs: update assist comment 2023-01-09 12:23:06 +01:00
extract_function.rs Auto merge of - lowr:fix/extract-fn-no-control-flow-with-tail-expr, r=Veykril 2023-08-08 13:38:49 +00:00
extract_module.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
extract_struct_from_enum_variant.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
extract_type_alias.rs Use ConstArg instead of Expr for AstId of InTypeConstId 2023-06-11 00:39:28 +03:30
extract_variable.rs fix: Fix receiver adjustments for extract_variable assist 2023-04-11 14:01:23 +02:00
fix_visibility.rs fix the rest of the nits 2023-07-11 17:32:12 -04:00
flip_binexpr.rs
flip_comma.rs
flip_trait_bound.rs
generate_constant.rs Add flag to disallow opaque types for DisplayTarget::SourceCode 2023-04-12 19:03:48 +09:00
generate_default_from_enum_variant.rs
generate_default_from_new.rs Don't provide generate_default_from_new when impl self ty is missing 2023-08-07 03:23:41 +09:00
generate_delegate_methods.rs Deunwrap generate_delegate_methods 2023-08-09 23:42:52 +02:00
generate_delegate_trait.rs Remove unwraps from Generate delegate trait 2023-08-05 19:23:56 +03:00
generate_deref.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
generate_derive.rs fix: Don't panic for different/missing delimiters 2023-07-08 13:43:30 -04:00
generate_documentation_template.rs Spelling 2023-04-19 09:45:55 -04:00
generate_enum_is_method.rs
generate_enum_projection_method.rs
generate_enum_variant.rs Add flag to disallow opaque types for DisplayTarget::SourceCode 2023-04-12 19:03:48 +09:00
generate_from_impl_for_enum.rs
generate_function.rs Show TyKind::FnDef as a fn pointer in source code 2023-07-28 19:09:38 +09:00
generate_getter_or_setter.rs Unify getter and setter assists 2023-07-06 12:27:45 +02:00
generate_impl.rs
generate_is_empty_from_len.rs Simplify 2023-02-27 15:51:45 +01:00
generate_new.rs Spelling 2023-04-19 09:45:55 -04:00
generate_trait_from_impl.rs Minor changes 2023-07-05 16:45:54 +02:00
inline_call.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
inline_const_as_literal.rs fix: use render_eval instead of inlined expr 2023-06-06 12:08:11 +02:00
inline_local_variable.rs Add BindingId 2023-03-06 21:09:08 +03:30
inline_macro.rs Turn unresolved proc macro expansions into missing expressions 2023-08-05 20:00:37 +02:00
inline_type_alias.rs
introduce_named_generic.rs fix: Move cursor before generated generic 2023-03-26 18:10:41 -04:00
introduce_named_lifetime.rs Spelling 2023-04-19 09:45:55 -04:00
invert_if.rs
merge_imports.rs a number of code simplifications 2023-01-10 18:48:51 +00:00
merge_match_arms.rs Fix pattern type mismatch in tuples 2023-05-04 16:03:36 +03:30
move_bounds.rs
move_const_to_impl.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
move_from_mod_rs.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
move_guard.rs
move_module_to_file.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
move_to_mod_rs.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
number_representation.rs
promote_local_to_const.rs fix the rest of the nits 2023-07-11 17:32:12 -04:00
pull_assignment_up.rs Use anonymous lifetime where possible 2023-06-29 23:27:28 +09:00
qualify_method_call.rs Spelling 2023-04-19 09:45:55 -04:00
qualify_path.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
raw_string.rs update assist to include more literals 2023-06-06 00:34:00 +02:00
remove_dbg.rs Remove unwrap from Remove dbg 2023-08-09 17:54:34 +03:00
remove_mut.rs
remove_parentheses.rs Spelling 2023-04-19 09:45:55 -04:00
remove_unused_imports.rs Deunwrap remove_unused_imports 2023-08-10 01:22:26 +02:00
remove_unused_param.rs Spelling 2023-04-19 09:45:55 -04:00
reorder_fields.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
reorder_impl_items.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
replace_arith_op.rs Fix replace_arith label 2023-01-17 16:31:34 +02:00
replace_derive_with_manual_impl.rs HiddenDocAttr becomes DocHiddenAttr 2023-07-07 14:15:15 +02:00
replace_if_let_with_match.rs Adjust replace_match_with_if_let applicability range 2023-03-05 16:52:07 +01:00
replace_let_with_if_let.rs
replace_method_eager_lazy.rs feature: Make replace_or_with_or_else assists more generally applicable 2023-03-06 22:17:30 +01:00
replace_named_generic_with_impl.rs Updated search to expose some more functions and to make search take the search scope by reference. 2023-07-09 17:30:21 -04:00
replace_qualified_name_with_use.rs
replace_string_with_char.rs Spelling 2023-04-19 09:45:55 -04:00
replace_try_expr_with_match.rs desugar ? operator 2023-03-17 13:08:35 +03:30
replace_turbofish_with_explicit_type.rs Add flag to disallow opaque types for DisplayTarget::SourceCode 2023-04-12 19:03:48 +09:00
sort_items.rs Restrict "sort items" assist inside Impl & Trait 2023-04-17 12:36:32 +02:00
split_import.rs
toggle_ignore.rs
unmerge_match_arm.rs a number of code simplifications 2023-01-10 18:48:51 +00:00
unmerge_use.rs
unnecessary_async.rs
unqualify_method_call.rs Rename assist: convert_ufcs_to_method => unqualify_method_call 2023-01-09 14:23:30 +00:00
unwrap_block.rs Simplify 2023-03-28 16:32:26 +02:00
unwrap_result_return_type.rs Format let-else 2023-07-03 20:34:09 +02:00
unwrap_tuple.rs
wrap_return_type_in_result.rs Migrate wrap_return_type_in_result to mutable ast 2023-07-07 20:06:10 -04:00