rust/crates/ra_ide/src
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
..
completion Merge #3169 2020-02-17 10:54:32 +00:00
display cleanup imports 2020-02-06 14:03:45 +01:00
references Handle macro token cases for rename 2020-02-09 17:17:56 +08:00
snapshots Add module colors to css 2020-02-16 17:06:01 +01:00
assists.rs Simplify Assists interface 2020-02-09 16:03:54 +01:00
call_hierarchy.rs cleanup imports 2020-02-06 14:03:45 +01:00
call_info.rs cleanup imports 2020-02-06 14:03:45 +01:00
completion.rs Added a utility function that can be used to determine the missing impl items. 2020-02-09 12:24:59 -06:00
diagnostics.rs cleanup imports 2020-02-06 14:03:45 +01:00
display.rs Remove unused imports 2019-12-20 11:18:24 -05:00
expand.rs cleanup imports 2020-02-06 14:03:45 +01:00
expand_macro.rs cleanup imports 2020-02-06 14:03:45 +01:00
extend_selection.rs cleanup imports 2020-02-06 14:03:45 +01:00
folding_ranges.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
goto_definition.rs Rename 2020-02-07 14:26:59 +01:00
goto_type_definition.rs Simplify 2020-02-12 18:02:00 +01:00
hover.rs Rename 2020-02-07 14:26:59 +01:00
impls.rs cleanup imports 2020-02-06 14:03:45 +01:00
inlay_hints.rs Add or- and parenthesized-patterns 2020-02-09 22:06:15 +00:00
join_lines.rs Return early, return often 2020-02-11 18:36:12 +01:00
lib.rs Merge #3099 2020-02-17 10:02:54 +00:00
marks.rs Tweak goto parent module 2020-02-06 15:47:33 +01:00
matching_brace.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
mock_analysis.rs Apply the reviews suggestions 2020-02-05 12:47:28 +02:00
parent_module.rs Tweak goto parent module 2020-02-06 15:47:33 +01:00
references.rs Use get_or_insert_with 2020-02-09 20:41:29 +08:00
runnables.rs Simplify module retrieval 2020-02-16 18:44:46 +02:00
source_change.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
ssr.rs Init implementation of structural search replace 2020-02-14 21:45:42 +00:00
status.rs cleanup imports 2020-02-06 14:03:45 +01:00
syntax_highlighting.rs Add module colors to css 2020-02-16 17:06:01 +01:00
syntax_tree.rs cleanup imports 2020-02-06 14:03:45 +01:00
test_utils.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
typing.rs cleanup imports 2020-02-06 14:03:45 +01:00