mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 22:54:00 +00:00
add hover tests
This commit is contained in:
parent
e86d451484
commit
91e7624de0
1 changed files with 35 additions and 0 deletions
|
@ -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
|
||||
..
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue