add hover tests

This commit is contained in:
Kartavya Vashishtha 2022-11-25 12:20:38 +05:30
parent e86d451484
commit 91e7624de0
No known key found for this signature in database
GPG key ID: A50012C2324E5DF0

View file

@ -5307,3 +5307,38 @@ fn main() { $0V; }
"#]],
);
}
#[test]
fn hover_rest_pat() {
check(
r#"
struct Struct {a: u32, b: u32, c: u8, d: u16};
fn main() {
let Struct {a, c, .$0.} = Struct {a: 1, b: 2, c: 3, d: 4};
}
"#,
expect![[r#"
*..*
```rust
.., b: u32, d: u16
```
"#]],
);
check(
r#"
struct Struct {a: u32, b: u32, c: u8, d: u16};
fn main() {
let Struct {a, b, c, d, .$0.} = Struct {a: 1, b: 2, c: 3, d: 4};
}
"#,
expect![[r#"
*..*
```rust
..
```
"#]],
);
}