about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/ide/src/hover/tests.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index ed9f6d507c6..85fe4cc964b 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -1347,6 +1347,24 @@ fn test_hover_function_pointer_show_types() {
 }
 
 #[test]
+fn test_hover_function_pointer_no_identifier_show_types() {
+    check(
+        r#"type foo$0 = fn(i32, _: i32) -> i32;"#,
+        expect![[r#"
+                *foo*
+
+                ```rust
+                test
+                ```
+
+                ```rust
+                type foo = fn(i32, i32) -> i32
+                ```
+            "#]],
+    );
+}
+
+#[test]
 fn test_hover_trait_show_qualifiers() {
     check_actions(
         r"unsafe trait foo$0() {}",