Skip to content

Commit 393b711

Browse files
committed
Add test for fn pointers
1 parent 371c5ae commit 393b711

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

crates/ra_ide/src/call_info.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,4 +720,19 @@ fn main() {
720720
"#]],
721721
)
722722
}
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+
}
723738
}

0 commit comments

Comments
 (0)