From fac1b0def12855fade4b29c180d5233a9b33646a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 15 Jul 2020 10:14:23 +0200 Subject: Off by one error when determining the active param closes #3615 --- crates/ra_ide/src/call_info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index e291c8e4b..e1d6efb2a 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs @@ -93,7 +93,7 @@ fn call_info_for_token(sema: &Semantics, token: SyntaxToken) -> Op arg_list .args() .take_while(|arg| { - arg.syntax().text_range().end() < token.text_range().start() + arg.syntax().text_range().end() <= token.text_range().start() }) .count(), ); @@ -276,7 +276,7 @@ fn bar() { foo(3,<|> ); } "#, expect![[r#" fn foo(x: u32, y: u32) -> u32 - (, y: u32) + (x: u32, ) "#]], ); check( -- cgit v1.2.3