File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,10 @@ fn signature_help_for_call(
115115 hir:: CallableKind :: Function ( func) => {
116116 res. doc = func. docs ( db) . map ( |it| it. into ( ) ) ;
117117 format_to ! ( res. signature, "fn {}" , func. name( db) ) ;
118- fn_params = Some ( func. assoc_fn_params ( db) ) ;
118+ fn_params = Some ( match func. self_param ( db) {
119+ Some ( _self) => func. params_without_self ( db) ,
120+ None => func. assoc_fn_params ( db) ,
121+ } ) ;
119122 }
120123 hir:: CallableKind :: TupleStruct ( strukt) => {
121124 res. doc = strukt. docs ( db) . map ( |it| it. into ( ) ) ;
@@ -1036,6 +1039,25 @@ fn f() {
10361039 ) ;
10371040 }
10381041
1042+ #[ test]
1043+ fn test_generic_param_in_method_call ( ) {
1044+ check (
1045+ r#"
1046+ struct Foo;
1047+ impl Foo {
1048+ fn test<V>(&mut self, val: V) {}
1049+ }
1050+ fn sup() {
1051+ Foo.test($0)
1052+ }
1053+ "# ,
1054+ expect ! [ [ r#"
1055+ fn test(&mut self, val: V)
1056+ ^^^^^^
1057+ "# ] ] ,
1058+ ) ;
1059+ }
1060+
10391061 #[ test]
10401062 fn test_generic_kinds ( ) {
10411063 check (
You can’t perform that action at this time.
0 commit comments