rust/crates/ide_assists/src/handlers
Morgan Thomas 3fafbca32e fix: "Extract to function" assist preserves break and continue labels
Adds a label / lifetime parameter to `ide_assists::handlers::extract_function::FlowKind::{Break, Continue}`, adds support for emitting labels to `syntax::ast::make::{expr_break, expr_continue}`, and implements the required machinery to let `extract_function` make use of them.

This does modify the external API of the `syntax` crate, but the changes there are simple, not used outside `ide_assists`, and, well, we should probably support emitting `break` and `continue` labels through `syntax` anyways, they're part of the language spec.

Closes #11413.
2022-03-12 08:54:06 -08:00
..
add_explicit_type.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
add_lifetime_to_type.rs
add_missing_impl_members.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
add_missing_match_arms.rs fix clippy::needless_borrow 2022-03-12 16:50:49 +01:00
add_return_type.rs refactor(assist/add_return_type): avoid threading needs_whitespace 2021-12-02 10:46:07 -08:00
add_turbo_fish.rs succinct code 2022-01-07 13:53:42 +00:00
apply_demorgan.rs fix: Fix apply_demorgan assist hanging for certain binary expressions 2022-01-05 22:30:19 +01:00
auto_import.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
change_visibility.rs
convert_bool_then.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
convert_comment_block.rs Fix some clippy lints 2021-12-17 17:46:20 +02:00
convert_integer_literal.rs
convert_into_to_from.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
convert_iter_for_each_to_for.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
convert_to_guarded_return.rs fix: "Extract to function" assist preserves break and continue labels 2022-03-12 08:54:06 -08:00
convert_tuple_struct_to_named_struct.rs internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
convert_while_to_loop.rs fix: "Extract to function" assist preserves break and continue labels 2022-03-12 08:54:06 -08:00
destructure_tuple_binding.rs Refactor autoderef and method resolution 2022-02-25 11:47:14 +01:00
expand_glob_import.rs Move ide crates to new hir::Macro 2022-03-08 23:52:26 +01:00
extract_function.rs fix: "Extract to function" assist preserves break and continue labels 2022-03-12 08:54:06 -08:00
extract_module.rs fix clippy::needless_late_init 2022-03-12 16:50:49 +01:00
extract_struct_from_enum_variant.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
extract_type_alias.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
extract_variable.rs fix clippy::needless_borrow 2022-03-12 16:50:49 +01:00
fix_visibility.rs Move ide crates to new hir::Macro 2022-03-08 23:52:26 +01:00
flip_binexpr.rs Make selections in assists with trailing/leading whitespace more forgiving 2021-10-12 14:41:59 +02:00
flip_comma.rs
flip_trait_bound.rs
generate_constant.rs
generate_default_from_enum_variant.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_default_from_new.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_delegate_methods.rs more clippy fixes: 2022-03-12 16:50:49 +01:00
generate_deref.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_derive.rs
generate_documentation_template.rs fix clippy::needless_borrow 2022-03-12 16:50:49 +01:00
generate_enum_is_method.rs
generate_enum_projection_method.rs
generate_from_impl_for_enum.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_function.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_getter.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
generate_impl.rs
generate_is_empty_from_len.rs Refactor autoderef and method resolution 2022-02-25 11:47:14 +01:00
generate_new.rs
generate_setter.rs
inline_call.rs more clippy fixes: 2022-03-12 16:50:49 +01:00
inline_local_variable.rs Support locals with multiple declaration sites 2022-03-04 19:49:08 +01:00
introduce_named_generic.rs
introduce_named_lifetime.rs
invert_if.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
merge_imports.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
merge_match_arms.rs more clippy fixes: 2022-03-12 16:50:49 +01:00
move_bounds.rs Preserve order of generic args 2022-03-04 11:46:14 +03:30
move_from_mod_rs.rs Make AssistContext::frange private 2021-10-13 14:39:37 +02:00
move_guard.rs Update tests 2022-02-21 08:34:35 +02:00
move_module_to_file.rs Make AssistContext::frange private 2021-10-13 14:39:37 +02:00
move_to_mod_rs.rs Make AssistContext::frange private 2021-10-13 14:39:37 +02:00
number_representation.rs fix clippy::single_char_pattern 2022-03-12 16:50:49 +01:00
promote_local_to_const.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
pull_assignment_up.rs
qualify_method_call.rs fix clippy::needless_borrow 2022-03-12 16:50:49 +01:00
qualify_path.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
raw_string.rs Implement promotoe_local_to_const assist 2021-10-14 21:49:46 +02:00
remove_dbg.rs Expand into pseudo-derive attribute expansions in completions 2022-03-10 20:53:50 +01:00
remove_mut.rs
remove_unused_param.rs internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
reorder_fields.rs
reorder_impl.rs
replace_derive_with_manual_impl.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
replace_if_let_with_match.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
replace_let_with_if_let.rs Fix various IDE features 2022-02-21 08:34:35 +02:00
replace_qualified_name_with_use.rs Move ide crates to new hir::Macro 2022-03-08 23:52:26 +01:00
replace_string_with_char.rs
replace_try_expr_with_match.rs Use array IntoIter 2021-10-22 09:23:29 +03:00
replace_turbofish_with_explicit_type.rs fixup! rustfmt 2021-10-27 10:58:31 -07:00
sort_items.rs Make AssistContext::frange private 2021-10-13 14:39:37 +02:00
split_import.rs Use mutable syntax trees in merge_imports, split_imports 2021-11-19 20:02:27 +05:00
toggle_ignore.rs
unmerge_use.rs Bump deps 2021-12-07 13:15:14 +02:00
unwrap_block.rs fix unwrap_block by removing double trimming 2021-12-18 23:19:53 +01:00
unwrap_result_return_type.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
wrap_return_type_in_result.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00