rust/crates/ide_db/src
bors[bot] 46d7ee68f2
Merge #11865
11865: Fix: Select correct insert position for disabled group import r=jonasbb a=jonasbb

The logic for importing with and without `group_imports` differed
significantly when no previous group existed. This lead to the problem
of using the wrong position when importing inside a module (#11585) or
when inner attributes are involved.
The existing code for grouped imports is better and takes these things
into account.

This PR changes the flow to use the pre-existing code for adding a new
import group even for the non-grouped import settings.
Some coverage markers are updated and the `group` is removed, since they
are now invoked in both cases (grouping and no grouping).

Tests are updated and two tests (empty module and inner attribute) are
added.

Fixes #11585

Co-authored-by: Jonas Bushart <jonas@bushart.org>
2022-04-03 18:46:45 +00:00
..
generated internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
imports Merge #11865 2022-04-03 18:46:45 +00:00
syntax_helpers feat: Tag macro calls as unsafe if they expand to unsafe expressions 2022-03-20 19:07:44 +01:00
test_data fix symbol index collection not collecting legacy macros 2022-03-09 01:44:20 +01:00
tests ⬆️ xshell 2022-03-14 14:57:24 +00:00
active_parameter.rs signature help: skip lifetimes when non-lifetime arguments are present 2022-03-22 16:44:27 +01:00
apply_change.rs Preserve order of generic args 2022-03-04 11:46:14 +03:30
assists.rs Fix some more basic clippy lints 2021-07-21 20:52:08 +02:00
defs.rs internal: Remove PathResolution::AssocItem 2022-04-01 18:32:05 +02:00
famous_defs.rs internal: Enforce Resolver to always have a module scope 2022-03-31 11:12:08 +02:00
helpers.rs fix: Fix runnables trying to add doc tests in the crate root from #[macro_export] macros 2022-03-18 12:01:59 +01:00
items_locator.rs fix clippy::useless_conversion 2022-03-12 16:50:49 +01:00
label.rs internal: slightly improve compile times 2021-08-29 12:53:56 +03:00
lib.rs minor: Access parser internals through ide_db for ide crates 2022-03-10 17:07:28 +01:00
line_index.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
path_transform.rs internal: Remove PathResolution::AssocItem 2022-04-01 18:32:05 +02:00
rename.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
rust_doc.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
search.rs internal: Refactor FamousDefs builtin crate search 2022-03-30 22:23:54 +02:00
source_change.rs remove resolved TODO questions 2021-10-27 15:40:30 +02:00
symbol_index.rs fix clippy::map_flatten 2022-03-12 16:50:49 +01:00
traits.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
ty_filter.rs Replace more Name::to_string usages with Name::to_smol_str 2021-11-04 18:12:05 +01:00