aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/fn_param.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/fn_param.rs')
-rw-r--r--crates/ide_completion/src/completions/fn_param.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/fn_param.rs b/crates/ide_completion/src/completions/fn_param.rs
index 0ea558489..cb90e8a3e 100644
--- a/crates/ide_completion/src/completions/fn_param.rs
+++ b/crates/ide_completion/src/completions/fn_param.rs
@@ -128,4 +128,19 @@ fn outer(text: String) {
128 "#]], 128 "#]],
129 ) 129 )
130 } 130 }
131
132 #[test]
133 fn completes_non_ident_pat_param() {
134 check(
135 r#"
136struct Bar { bar: u32 }
137
138fn foo(Bar { bar }: Bar) {}
139fn foo2($0) {}
140"#,
141 expect![[r#"
142 bn Bar { bar }: Bar
143 "#]],
144 )
145 }
131} 146}