Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
-rw-r--r--crates/ide/src/hover/tests.rs38
1 files changed, 32 insertions, 6 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index cca62d2181..e60be577f7 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -7175,7 +7175,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: Yes
+ // Dyn Compatible: Yes
trait T {}
```
"#]],
@@ -7195,7 +7195,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: Yes
+ // Dyn Compatible: Yes
trait T {}
```
"#]],
@@ -7219,7 +7219,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: No
+ // Dyn Compatible: No
// - Reason: has a method `func` that is non dispatchable because of:
// - missing a receiver
trait T { /* … */ }
@@ -7245,7 +7245,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: No
+ // Dyn Compatible: No
// - Reason: has a method `func` that is non dispatchable because of:
// - missing a receiver
trait T {
@@ -7275,7 +7275,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: No
+ // Dyn Compatible: No
// - Reason: has a method `func` that is non dispatchable because of:
// - missing a receiver
trait T {
@@ -7305,7 +7305,7 @@ impl T$0 for () {}
```
```rust
- // Object Safety: No
+ // Dyn Compatible: No
// - Reason: has a method `func` that is non dispatchable because of:
// - missing a receiver
trait T {
@@ -8962,3 +8962,29 @@ fn test_hover_function_with_pat_param() {
"#]],
);
}
+
+#[test]
+fn hover_path_inside_block_scope() {
+ check(
+ r#"
+mod m {
+ const _: () = {
+ mod m2 {
+ const C$0: () = ();
+ }
+ };
+}
+"#,
+ expect![[r#"
+ *C*
+
+ ```rust
+ test::m::m2
+ ```
+
+ ```rust
+ const C: () = ()
+ ```
+ "#]],
+ );
+}