File tree 1 file changed +23
-1
lines changed
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(
115
115
hir:: CallableKind :: Function ( func) => {
116
116
res. doc = func. docs ( db) . map ( |it| it. into ( ) ) ;
117
117
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
+ } ) ;
119
122
}
120
123
hir:: CallableKind :: TupleStruct ( strukt) => {
121
124
res. doc = strukt. docs ( db) . map ( |it| it. into ( ) ) ;
@@ -1036,6 +1039,25 @@ fn f() {
1036
1039
) ;
1037
1040
}
1038
1041
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
+
1039
1061
#[ test]
1040
1062
fn test_generic_kinds ( ) {
1041
1063
check (
You can’t perform that action at this time.
0 commit comments