mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: Improve self param completion applicability
This commit is contained in:
parent
25090f0e6d
commit
b96f8f18b0
6 changed files with 124 additions and 18 deletions
|
@ -6,7 +6,7 @@ use itertools::Itertools;
|
|||
use syntax::SmolStr;
|
||||
|
||||
use crate::{
|
||||
context::{ParamKind, PatternContext},
|
||||
context::{ParamContext, ParamKind, PatternContext},
|
||||
render::{
|
||||
variant::{format_literal_label, visible_fields},
|
||||
RenderContext,
|
||||
|
@ -102,7 +102,7 @@ fn render_pat(
|
|||
let needs_ascription = matches!(
|
||||
pattern_ctx,
|
||||
PatternContext {
|
||||
param_ctx: Some((.., ParamKind::Function(_))),
|
||||
param_ctx: Some(ParamContext { kind: ParamKind::Function(_), .. }),
|
||||
has_type_ascription: false,
|
||||
..
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue