mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Filter out non-type completions in the respective completions modules instead
This commit is contained in:
parent
79703efc7f
commit
354ad29493
6 changed files with 95 additions and 72 deletions
|
@ -55,9 +55,6 @@ pub(crate) fn render_resolution_with_import(
|
|||
import_edit: ImportEdit,
|
||||
) -> Option<CompletionItem> {
|
||||
let resolution = hir::ScopeDef::from(import_edit.import.original_item);
|
||||
if ctx.completion.expects_type() && resolution.is_value_def() {
|
||||
return None;
|
||||
}
|
||||
let local_name = match resolution {
|
||||
hir::ScopeDef::ModuleDef(hir::ModuleDef::Function(f)) => f.name(ctx.completion.db),
|
||||
hir::ScopeDef::ModuleDef(hir::ModuleDef::Const(c)) => c.name(ctx.completion.db)?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue