about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-08 12:39:23 +0000
committerbors <bors@rust-lang.org>2023-12-08 12:39:23 +0000
commitb03a0bda185ec06ad8989a20e0d8b577ed86429b (patch)
tree4eff559de345b48f544d06a6462d0de5cb0c79ea /compiler/rustc_interface/src/errors.rs
parent86cccc76e3c7f3039a3764ae445b616b115517da (diff)
parent1475848250288fcb0adbbede11c541b0a7458fb9 (diff)
downloadrust-b03a0bda185ec06ad8989a20e0d8b577ed86429b.tar.gz
rust-b03a0bda185ec06ad8989a20e0d8b577ed86429b.zip
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](https://github.com/rust-lang/rust-analyzer/blob/05666441bafd6010787a4097a6bd44266ad21018/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.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions