Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
-rw-r--r--crates/ide/src/hover/tests.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index d1e51a2d28..1a97d99f05 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -8743,7 +8743,6 @@ fn foo() {
);
}
-
#[test]
fn test_hover_function_with_pat_param() {
check(
@@ -8856,4 +8855,20 @@ fn test_hover_function_with_pat_param() {
```
"#]],
);
+
+ // Test case with Enum and Or pattern
+ check(
+ r#"enum MyEnum { A(i32), B(i32) } fn test_8$0((MyEnum::A(x) | MyEnum::B(x)): MyEnum) {}"#,
+ expect![[r#"
+ *test_8*
+
+ ```rust
+ test
+ ```
+
+ ```rust
+ fn test_8((MyEnum::A(x) | MyEnum::B(x)): MyEnum)
+ ```
+ "#]],
+ );
}