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:
bors[bot] 2021-11-08 13:12:03 +00:00 committed by GitHub
commit c5c11b87cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 9 deletions

View file

@ -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(' ');