]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #13379 - DropDemBits:ide-assists-format-args-capture, r=Veykril
authorbors <bors@rust-lang.org>
Sat, 5 Nov 2022 12:29:06 +0000 (12:29 +0000)
committerbors <bors@rust-lang.org>
Sat, 5 Nov 2022 12:29:06 +0000 (12:29 +0000)
internal: Migrate `ide_assists::utils` and `ide_assists::handlers` to use format arg captures (part 1)

This not only serves as making future migration to mutable syntax trees easier, it also finds out what needs to be migrated in the first place.

~~Aside from the first commit, subsequent commits are structured to only deal with one file/handler at a time.~~

This is the first of 3 PRs, migrating:

Utils:

- `gen_trait_fn_body`
- `render_snippet`
- `ReferenceConversion`
  - `convert_type`
  - `getter`

Handlers:

- `add_explicit_type`
- `add_return_type`
- `add_turbo_fish`
- `apply_demorgan`
- `auto_import`
- `convert_comment_block`
- `convert_integer_literal`
- `convert_into_to_from`
- `convert_iter_for_each_to_for`
- `convert_let_else_to_match`
- `convert_tuple_struct_to_named_struct`
- `convert_two_arm_bool_match_to_matches_macro`
- `destructure_tuple_binding`
- `extract_function`
- `extract_module`
- `extract_struct_from_enum_variant`
- `extract_type_alias`
- `extract_variable`
- `fix_visibility`

1  2 
crates/ide-assists/src/handlers/auto_import.rs
crates/ide-assists/src/utils.rs

Simple merge