diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index 831c4ad124..29fa7d30b4 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs @@ -40,13 +40,8 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option 1 { // Count how many parameters into the call we are. if let Some(arg_list) = calling_node.arg_list() { - // Number of arguments specified at the caller site - let mut num_args_of_call = arg_list.args().count(); - - // If we are calling a method account for the `self` argument. - if has_self { - num_args_of_call = num_args_of_call + 1; - } + // Number of arguments specified at the call site + let num_args_at_callsite = arg_list.args().count(); let arg_list_range = arg_list.syntax().range(); if !arg_list_range.contains_inclusive(position.offset) { @@ -54,12 +49,18 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option