Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 91e7624

Browse files
committed
add hover tests
1 parent e86d451 commit 91e7624

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

crates/ide/src/hover/tests.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5307,3 +5307,38 @@ fn main() { $0V; }
53075307
"#]],
53085308
);
53095309
}
5310+
5311+
#[test]
5312+
fn hover_rest_pat() {
5313+
check(
5314+
r#"
5315+
struct Struct {a: u32, b: u32, c: u8, d: u16};
5316+
5317+
fn main() {
5318+
let Struct {a, c, .$0.} = Struct {a: 1, b: 2, c: 3, d: 4};
5319+
}
5320+
"#,
5321+
expect![[r#"
5322+
*..*
5323+
```rust
5324+
.., b: u32, d: u16
5325+
```
5326+
"#]],
5327+
);
5328+
5329+
check(
5330+
r#"
5331+
struct Struct {a: u32, b: u32, c: u8, d: u16};
5332+
5333+
fn main() {
5334+
let Struct {a, b, c, d, .$0.} = Struct {a: 1, b: 2, c: 3, d: 4};
5335+
}
5336+
"#,
5337+
expect![[r#"
5338+
*..*
5339+
```rust
5340+
..
5341+
```
5342+
"#]],
5343+
);
5344+
}

0 commit comments

Comments
 (0)