mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
completion relevance distinguish between exact type match and could unify
This commit is contained in:
parent
957939292e
commit
0e31ae2cef
5 changed files with 87 additions and 50 deletions
|
@ -6,7 +6,7 @@ use itertools::Itertools;
|
|||
|
||||
use crate::{
|
||||
item::{CompletionItem, CompletionKind, ImportEdit},
|
||||
render::{builder_ext::Params, compute_exact_type_match, compute_ref_match, RenderContext},
|
||||
render::{builder_ext::Params, compute_ref_match, compute_type_match, RenderContext},
|
||||
CompletionRelevance,
|
||||
};
|
||||
|
||||
|
@ -77,7 +77,7 @@ impl<'a> EnumRender<'a> {
|
|||
|
||||
let ty = self.variant.parent_enum(self.ctx.completion.db).ty(self.ctx.completion.db);
|
||||
item.set_relevance(CompletionRelevance {
|
||||
exact_type_match: compute_exact_type_match(self.ctx.completion, &ty),
|
||||
type_match: compute_type_match(self.ctx.completion, &ty),
|
||||
..CompletionRelevance::default()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue