From aef8882254e1443fb68d449be5f8006c46533c5a Mon Sep 17 00:00:00 2001 From: Jake Heinz Date: Thu, 18 Nov 2021 04:14:11 +0000 Subject: [PATCH] more complicated const test --- 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 329e6b177f4..897f8d7b831 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -514,6 +514,28 @@ fn hover_const_static() { ``` "#]], ); + check( + r#" +const foo$0: u32 = { + let x = foo(); + x + 100 +};"#, + expect![[r#" + *foo* + + ```rust + test + ``` + + ```rust + const foo: u32 = { + let x = foo(); + x + 100 + } + ``` + "#]], + ); + check( r#"static foo$0: u32 = 456;"#, expect![[r#"