]> git.lizzy.rs Git - rust.git/blobdiff - crates/ide/src/hover/tests.rs
more complicated const test
[rust.git] / crates / ide / src / hover / tests.rs
index 329e6b177f40b5db3718bc35313190cfcfd8fa92..897f8d7b8312a3454aebdedd72bc386285b61ff6 100644 (file)
@@ -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#"