rust/crates
bors[bot] fcf15cc05a
Merge #3169
3169: Show record field names in Enum completion r=flodiebold a=adamrk

Adresses https://github.com/rust-analyzer/rust-analyzer/issues/2947.
Previously the details shown when autocompleting an Enum variant would look like the variant was a tuple even if it was a record:
![2020-02-16-15:59:32_crop](https://user-images.githubusercontent.com/16367467/74607233-64f21980-50d7-11ea-99db-e973e29c71d7.png)

This change will show the names of the fields for a record and use curly braces instead of parentheses:
![2020-02-16-15:33:00_crop](https://user-images.githubusercontent.com/16367467/74607251-8ce17d00-50d7-11ea-9d4d-38d198a4aec0.png)

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 <ark.email@gmail.com>
2020-02-17 10:54:32 +00:00
..
ra_arena
ra_assists Merge #3108 2020-02-17 09:34:08 +00:00
ra_batch
ra_cargo_watch
ra_cfg
ra_cli 1-based columns 2020-02-16 18:30:48 +01:00
ra_db
ra_fmt
ra_hir Merge #3169 2020-02-17 10:54:32 +00:00
ra_hir_def Merge #3169 2020-02-17 10:54:32 +00:00
ra_hir_expand Add couple of utility methods 2020-02-12 18:19:55 +01:00
ra_hir_ty Merge #3169 2020-02-17 10:54:32 +00:00
ra_ide Merge #3169 2020-02-17 10:54:32 +00:00
ra_ide_db Remove extra dep 2020-02-15 23:23:44 +01:00
ra_lsp_server Merge #3099 2020-02-17 10:02:54 +00:00
ra_mbe
ra_parser Add test for unnamed argument in function pointer 2020-02-12 22:55:37 +01:00
ra_prof Enable profiling for bench 2020-02-16 18:04:08 +01:00
ra_project_model Make AtomicX type resolve again 2020-02-14 19:33:39 +01:00
ra_syntax Init implementation of structural search replace 2020-02-14 21:45:42 +00:00
ra_text_edit move to to_usize() 2020-02-10 01:57:43 +02:00
ra_tt
ra_vfs_glob
test_utils