You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3169: Show record field names in Enum completion r=flodiebold a=adamrk
Adresses #2947.
Previously the details shown when autocompleting an Enum variant would look like the variant was a tuple even if it was a record:

This change will show the names of the fields for a record and use curly braces instead of parentheses:

This required exposing the type `adt::StructKind` from `ra_hir` and adding a function
```
kind(self, db: &impl HirDatabase) -> StructKind
```
in the `impl` of `EnumVariant`.
There was also a previously existing function `is_unit(self, db: &impl HirDatabase) -> bool` for `EnumVariant` which I removed because it seemed redundant after adding `kind`.
Co-authored-by: adamrk <[email protected]>
0 commit comments