Show type info on hover of enum variant fields

This commit is contained in:
Lukas Wirth 2022-12-09 10:09:55 +01:00
parent 6e8a54d0f6
commit e80674e6b3
5 changed files with 43 additions and 15 deletions

View file

@ -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(