mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Set record_pat_syntax
more precisely in CompletionContext
This commit is contained in:
parent
666fc1cec1
commit
1f897f7319
3 changed files with 58 additions and 41 deletions
|
@ -20,7 +20,6 @@ use ide_db::{
|
|||
use syntax::TextRange;
|
||||
|
||||
use crate::{
|
||||
context::IsPatOrConst,
|
||||
item::{CompletionRelevanceTypeMatch, ImportEdit},
|
||||
CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance,
|
||||
};
|
||||
|
@ -188,9 +187,7 @@ impl<'a> Render<'a> {
|
|||
ScopeDef::ModuleDef(Function(func)) => {
|
||||
return render_fn(self.ctx, import_to_add, Some(local_name), *func);
|
||||
}
|
||||
ScopeDef::ModuleDef(Variant(_))
|
||||
if self.ctx.completion.is_pat_or_const != IsPatOrConst::No =>
|
||||
{
|
||||
ScopeDef::ModuleDef(Variant(_)) if self.ctx.completion.is_pat_or_const.is_some() => {
|
||||
CompletionItemKind::SymbolKind(SymbolKind::Variant)
|
||||
}
|
||||
ScopeDef::ModuleDef(Variant(var)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue