File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
crates/ide-completion/src Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ fn render_pat(
163163 PatternContext {
164164 param_ctx: Some ( ParamContext { kind: ParamKind :: Function ( _) , .. } ) ,
165165 has_type_ascription: false ,
166+ parent_pat: None ,
166167 ..
167168 }
168169 ) ;
Original file line number Diff line number Diff line change @@ -398,6 +398,25 @@ fn foo($0) {}
398398 )
399399}
400400
401+ #[ test]
402+ fn completes_in_fn_param_in_nested_pattern ( ) {
403+ check (
404+ r#"
405+ struct Foo { num: u32 }
406+ struct Bar(Foo);
407+ fn foo(Bar($0)) {}
408+ "# ,
409+ expect ! [ [ r#"
410+ st Bar
411+ st Foo
412+ bn Bar(…) Bar($1)$0
413+ bn Foo {…} Foo { num$1 }$0
414+ kw mut
415+ kw ref
416+ "# ] ] ,
417+ )
418+ }
419+
401420#[ test]
402421fn completes_in_closure_param ( ) {
403422 check (
You can’t perform that action at this time.
0 commit comments