rust/crates/ide_db/src
bors[bot] b69eee6487
Merge #10809
10809: fix: don't discard formatting of `use` lines r=Veykril a=iDawer

Use mutable syntax trees in `merge_imports`, `split_imports`. This tries to resolve #9013. But I haven't much managed to simplify code of merging.

Also resolve #9361. It reuses a use tree under the cursor so that comments+indentation are preserved. Merged trees are just appended to the end.

This touches bunch of tests. I removed the sorting of use trees as it needs a proper implementation that takes into account comments and line wrapping. I think it is rustfmt's job or at least until we get a close implementation.

Co-authored-by: iDawer <ilnur.iskhakov.oss@outlook.com>
2021-11-22 14:29:24 +00:00
..
helpers Use mutable syntax trees in merge_imports, split_imports 2021-11-19 20:02:27 +05:00
line_index
tests Use array into_iter in more places 2021-11-04 07:51:20 +02:00
traits simplify 2021-05-28 20:46:09 +02:00
active_parameter.rs Split parts of ide_db::call_info off into ide 2021-11-22 13:23:34 +01:00
apply_change.rs Rename intern_macro -> intern_macro_call 2021-11-14 16:25:47 +01:00
assists.rs Fix some more basic clippy lints 2021-07-21 20:52:08 +02:00
defs.rs Replace some more ide usages of ModuleDef with Definition 2021-11-11 18:20:54 +01:00
helpers.rs Replace some more ide usages of ModuleDef with Definition 2021-11-11 18:20:54 +01:00
items_locator.rs internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
label.rs internal: slightly improve compile times 2021-08-29 12:53:56 +03:00
lib.rs Split parts of ide_db::call_info off into ide 2021-11-22 13:23:34 +01:00
line_index.rs
path_transform.rs Substitute generic types in inline_call 2021-08-10 14:39:56 +02:00
rename.rs internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
search.rs internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
source_change.rs remove resolved TODO questions 2021-10-27 15:40:30 +02:00
symbol_index.rs Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
traits.rs Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
ty_filter.rs Replace more Name::to_string usages with Name::to_smol_str 2021-11-04 18:12:05 +01:00