mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Fix edge case for ImportGranularity guessing
This commit is contained in:
parent
590472607c
commit
31aad2528f
3 changed files with 30 additions and 8 deletions
|
@ -660,6 +660,13 @@ fn guess_item() {
|
|||
r"
|
||||
use foo::bar::baz;
|
||||
use foo::bar::qux;
|
||||
",
|
||||
ImportGranularityGuess::Item,
|
||||
);
|
||||
check_guess(
|
||||
r"
|
||||
use foo::bar::Bar;
|
||||
use foo::baz;
|
||||
",
|
||||
ImportGranularityGuess::Item,
|
||||
);
|
||||
|
@ -679,6 +686,14 @@ use foo::bar::{qux, quux};
|
|||
r"
|
||||
use foo::bar::baz;
|
||||
use foo::{baz::{qux, quux}, bar};
|
||||
",
|
||||
ImportGranularityGuess::Module,
|
||||
);
|
||||
check_guess(
|
||||
r"
|
||||
use foo::bar::Bar;
|
||||
use foo::baz::Baz;
|
||||
use foo::{Foo, Qux};
|
||||
",
|
||||
ImportGranularityGuess::Module,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue