diff options
author | Aleksey Kladov <[email protected]> | 2020-07-17 11:03:59 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-17 11:04:12 +0100 |
commit | 393b7119bd5341bffb166e0dadcff9124e28b888 (patch) | |
tree | 831ce3e0daf63acb757f05b4ec0140344f6fcd27 | |
parent | 371c5aec1c4ad18f37e96b4bf85c49563fc4a01d (diff) |
Add test for fn pointers
-rw-r--r-- | crates/ra_ide/src/call_info.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index 53d56a0a4..14980afdd 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs | |||
@@ -720,4 +720,19 @@ fn main() { | |||
720 | "#]], | 720 | "#]], |
721 | ) | 721 | ) |
722 | } | 722 | } |
723 | |||
724 | #[test] | ||
725 | fn call_info_for_fn_ptr() { | ||
726 | check( | ||
727 | r#" | ||
728 | fn main(f: fn(i32, f64) -> char) { | ||
729 | f(0, <|>) | ||
730 | } | ||
731 | "#, | ||
732 | expect![[r#" | ||
733 | (i32, f64) -> char | ||
734 | (i32, <f64>) | ||
735 | "#]], | ||
736 | ) | ||
737 | } | ||
723 | } | 738 | } |