rust-analyzer/crates/ide-completion
bors b03a0bda18 Auto merge of #15627 - jmintb:sort_imports, r=Veykril
feat: Prioritize import suggestions based on the expected type

Hi, this is a draft PR to solve #15384. `Adt` types work and now I have a few questions :)

1. What other types make sense in this context? Looking at [ModuleDef](05666441ba/crates/hir/src/lib.rs (L275)) I am thinking everything except Modules.
2. Is there an existing way of converting between `ModeuleDef` and `hir::Type` in the rustanalyzer code base?
3. Does this approach seem sound to you?

Ups: Upon writing this I just realised that the enum test is invalided as there are no enum variants and this no variant is passed as a function argument.
2023-12-08 12:39:23 +00:00
..
src Auto merge of #15627 - jmintb:sort_imports, r=Veykril 2023-12-08 12:39:23 +00:00
Cargo.toml Bump itertools 2023-11-15 12:53:56 +02:00