Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
| -rw-r--r-- | crates/ide/src/inlay_hints.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index 3cb60d9e44..47f1a08b6f 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs @@ -1170,6 +1170,23 @@ fn main() { } #[test] + fn param_hints_on_closure() { + check_params( + r#" +fn main() { + let clo = |a: u8, b: u8| a + b; + clo( + 1, + //^ a + 2, + //^ b + ); +} + "#, + ); + } + + #[test] fn param_name_similar_to_fn_name_still_hints() { check_params( r#" @@ -2000,7 +2017,8 @@ fn main() { ; - let _: i32 = multiply(1, 2); + let _: i32 = multiply(1, 2); + //^ a ^ b let multiply_ref = &multiply; //^^^^^^^^^^^^ &|i32, i32| -> i32 |