Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #12135 - Veykril:hirdisp, r=Veykril
minor: Add a test for display rendering record variants
bors 2022-05-02
parent 29ccf5c · parent b6e19ad · commit b0d092b
-rw-r--r--crates/ide/src/hover/tests.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index baab746d74..d61b5af13a 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -4676,3 +4676,25 @@ pub struct Type;
"#]],
);
}
+
+#[test]
+fn hover_record_variant() {
+ check(
+ r#"
+enum Enum {
+ RecordV$0 { field: u32 }
+}
+"#,
+ expect![[r#"
+ *RecordV*
+
+ ```rust
+ test::Enum
+ ```
+
+ ```rust
+ RecordV { field: u32 }
+ ```
+ "#]],
+ );
+}