rust/crates
bors[bot] ff7e057dca
Merge #11691
11691: feat: Suggest union literals, suggest union fields within an empty union literal r=Veykril a=m0rg-dev

Adds a `Union {…}` completion in contexts where a union is expected, expanding to a choice of available fields (if snippets are supported):

![image](https://user-images.githubusercontent.com/38578268/158023335-84c03e39-daf0-4a52-b969-f40b01501cc8.png)
![image](https://user-images.githubusercontent.com/38578268/158023354-db49d0bb-034c-49d3-bc02-07414179cb61.png)

Also, adds support for listing possible fields in an empty union literal.

![image](https://user-images.githubusercontent.com/38578268/158023398-4695ae34-ce64-4f40-8494-68731a3030c6.png)
![image](https://user-images.githubusercontent.com/38578268/158023406-be96dd95-125a-47ac-9628-0bce634ca2eb.png)

Closes #11568.

Co-authored-by: Morgan Thomas <corp@m0rg.dev>
2022-03-12 15:44:51 +00:00
..
base_db fix: Properly handle proc-macro crate types for nameres 2022-03-09 14:33:39 +01:00
cfg Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
flycheck Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
hir internal: Remove ide_completion::render::build_ext module 2022-03-12 16:13:49 +01:00
hir_def fix: Show what file paths were expected for unresolved modules 2022-03-11 17:08:30 +01:00
hir_expand Expand into pseudo-derive attribute expansions in completions 2022-03-10 20:53:50 +01:00
hir_ty Merge #11660 2022-03-09 17:18:03 +00:00
ide Optimize imports 2022-03-12 21:06:33 +08:00
ide_assists Expand into pseudo-derive attribute expansions in completions 2022-03-10 20:53:50 +01:00
ide_completion Merge #11691 2022-03-12 15:44:51 +00:00
ide_db Expand into pseudo-derive attribute expansions in completions 2022-03-10 20:53:50 +01:00
ide_diagnostics fix: Show what file paths were expected for unresolved modules 2022-03-11 17:08:30 +01:00
ide_ssr Disable one of the failing SSR test cases 2022-03-09 02:08:44 +01:00
limit Use compare_exchange_weak in limit::Limit::check 2022-01-28 18:19:35 +03:00
mbe Do not consider _ to be an expression for macro_rules! 2022-03-02 01:51:25 +00:00
parser refactor: Rename and move const_arg_path 2022-03-11 22:28:38 +00:00
paths Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
proc_macro_api Set current working directory for procedural macros 2022-01-27 16:18:12 +03:00
proc_macro_srv fix: Fix proc-macro server not using the supplied span in Ident::new 2022-01-31 17:02:57 +01:00
proc_macro_test Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
profile Generate AnyHasDocComments node 2022-01-07 12:38:18 +01:00
project_model Update project_model test outputs 2022-03-09 22:34:42 +01:00
rust-analyzer minor: Pad type inlay hints if no colons are requested 2022-03-12 14:08:39 +01:00
sourcegen Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
stdx Generate AnyHasDocComments node 2022-01-07 12:38:18 +01:00
syntax Don't parse source files to generate macro completion details 2022-03-10 22:21:58 +01:00
test_utils fix: Allow configuration of colons in inlay-hints 2022-03-11 21:15:36 +01:00
text_edit redirct: use iterators and knowledge about preordered arrays for more efficient merging 2022-02-28 05:56:51 +01:00
toolchain Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
tt Track synthetic tokens, to be able to remove them again later 2022-02-08 18:13:18 +01:00
vfs Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
vfs-notify Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00