diff options
author | Aleksey Kladov <[email protected]> | 2020-07-15 09:14:23 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-15 09:14:23 +0100 |
commit | fac1b0def12855fade4b29c180d5233a9b33646a (patch) | |
tree | 1f6ac29ef9654f781355931556a36aad8674fafa /crates | |
parent | 1f411f87ea683fa9b6a1206b030d38db28123547 (diff) |
Off by one error when determining the active param
closes #3615
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/call_info.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<RootDatabase>, token: SyntaxToken) -> Op | |||
93 | arg_list | 93 | arg_list |
94 | .args() | 94 | .args() |
95 | .take_while(|arg| { | 95 | .take_while(|arg| { |
96 | arg.syntax().text_range().end() < token.text_range().start() | 96 | arg.syntax().text_range().end() <= token.text_range().start() |
97 | }) | 97 | }) |
98 | .count(), | 98 | .count(), |
99 | ); | 99 | ); |
@@ -276,7 +276,7 @@ fn bar() { foo(3,<|> ); } | |||
276 | "#, | 276 | "#, |
277 | expect![[r#" | 277 | expect![[r#" |
278 | fn foo(x: u32, y: u32) -> u32 | 278 | fn foo(x: u32, y: u32) -> u32 |
279 | (<x: u32>, y: u32) | 279 | (x: u32, <y: u32>) |
280 | "#]], | 280 | "#]], |
281 | ); | 281 | ); |
282 | check( | 282 | check( |