mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
b69eee6487
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> |
||
---|---|---|
.. | ||
base_db | ||
cfg | ||
flycheck | ||
hir | ||
hir_def | ||
hir_expand | ||
hir_ty | ||
ide | ||
ide_assists | ||
ide_completion | ||
ide_db | ||
ide_diagnostics | ||
ide_ssr | ||
limit | ||
mbe | ||
parser | ||
paths | ||
proc_macro_api | ||
proc_macro_srv | ||
proc_macro_test | ||
profile | ||
project_model | ||
rust-analyzer | ||
sourcegen | ||
stdx | ||
syntax | ||
test_utils | ||
text_edit | ||
toolchain | ||
tt | ||
vfs | ||
vfs-notify |