mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Show type info on hover of enum variant fields
This commit is contained in:
parent
6e8a54d0f6
commit
e80674e6b3
5 changed files with 43 additions and 15 deletions
|
@ -5176,6 +5176,28 @@ enum Enum {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_record_variant_field() {
|
||||
check(
|
||||
r#"
|
||||
enum Enum {
|
||||
RecordV { field$0: u32 }
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*field*
|
||||
|
||||
```rust
|
||||
test::RecordV
|
||||
```
|
||||
|
||||
```rust
|
||||
field: u32 // size = 4, align = 4
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_trait_impl_assoc_item_def_doc_forwarding() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue