From 393b7119bd5341bffb166e0dadcff9124e28b888 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 17 Jul 2020 12:03:59 +0200 Subject: [PATCH] Add test for fn pointers --- crates/ra_ide/src/call_info.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index 53d56a0a4a7..14980afdd04 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs @@ -720,4 +720,19 @@ fn main() { "#]], ) } + + #[test] + fn call_info_for_fn_ptr() { + check( + r#" +fn main(f: fn(i32, f64) -> char) { + f(0, <|>) +} + "#, + expect![[r#" + (i32, f64) -> char + (i32, ) + "#]], + ) + } }