mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Merge #10720
10720: fix: Don't ascribe types in pattern completion for param patterns twice r=Veykril a=Veykril Fixes #10323 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
c5c11b87cc
3 changed files with 50 additions and 9 deletions
|
@ -86,7 +86,11 @@ fn render_pat(
|
|||
|
||||
if matches!(
|
||||
ctx.completion.pattern_ctx,
|
||||
Some(PatternContext { is_param: Some(ParamKind::Function), .. })
|
||||
Some(PatternContext {
|
||||
is_param: Some(ParamKind::Function),
|
||||
has_type_ascription: false,
|
||||
..
|
||||
})
|
||||
) {
|
||||
pat.push(':');
|
||||
pat.push(' ');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue