Unnamed repository; edit this file 'description' to name the repository.
more complicated const test
Jake Heinz 2021-11-18
parent d5de7c2 · commit aef8882
-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 329e6b177f..897f8d7b83 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -515,6 +515,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#"
*foo*