From b6e19add063acfc31c6b2a635d0ba0725deb6650 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 2 May 2022 12:51:00 +0200 Subject: [PATCH] minor: Add a test for display rendering record variants --- crates/ide/src/hover/tests.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 } + ``` + "#]], + ); +}