mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
46d7ee68f2
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> |
||
---|---|---|
.. | ||
generated | ||
imports | ||
syntax_helpers | ||
test_data | ||
tests | ||
active_parameter.rs | ||
apply_change.rs | ||
assists.rs | ||
defs.rs | ||
famous_defs.rs | ||
helpers.rs | ||
items_locator.rs | ||
label.rs | ||
lib.rs | ||
line_index.rs | ||
path_transform.rs | ||
rename.rs | ||
rust_doc.rs | ||
search.rs | ||
source_change.rs | ||
symbol_index.rs | ||
traits.rs | ||
ty_filter.rs |