rust/crates
bors[bot] 278bf351e3
Merge #4065
4065: Complete unqualified enum names in patterns and expressions r=matklad a=nathanwhit

This PR implements the completion described in #4014.
The result looks like so for patterns:
<img width="542" alt="Screen Shot 2020-04-20 at 3 53 55 PM" src="https://user-images.githubusercontent.com/17734409/79794010-8f529400-831f-11ea-9673-f838aa9bc962.png">

and for `expr`s:
<img width="620" alt="Screen Shot 2020-04-21 at 3 51 24 PM" src="https://user-images.githubusercontent.com/17734409/79908784-d73ded80-83e9-11ea-991d-921f0cb27e6f.png">


I'm not confident that the completion text itself is very robust, as it will unconditionally add completions for enum variants with the form `Enum::Variant`. This means (I believe) it would still suggest `Enum::Variant` even if the local name is changed i.e. `use Enum as Foo` or the variants are brought into scope such as through `use Enum::*`.

Co-authored-by: nathanwhit <nathan.whitaker01@gmail.com>
2020-04-23 15:35:31 +00:00
..
ra_arena Use resize_with 2020-03-31 09:02:12 -04:00
ra_assists Do not add default and closure types in 'add explicit type' assist 2020-04-21 22:56:40 +03:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Some clippy fixes 2020-04-19 15:15:49 -04:00
ra_flycheck insta 0.16 2020-04-14 13:57:02 -04:00
ra_fmt Provide more complete AST accessors to support usage in rustc 2020-04-09 11:50:37 +02:00
ra_hir Do not add default and closure types in 'add explicit type' assist 2020-04-21 22:56:40 +03:00
ra_hir_def Remove SyntaxPtr::range from more places 2020-04-23 16:33:01 +02:00
ra_hir_expand Improve remove dervie attrs 2020-04-22 01:44:21 +08:00
ra_hir_ty Update Chalk, and cache Chalk env elaboration through a query 2020-04-20 19:16:01 +02:00
ra_ide Merge #4065 2020-04-23 15:35:31 +00:00
ra_ide_db Remove SyntaxPtr::range from more places 2020-04-23 16:33:01 +02:00
ra_mbe Convert bool to ident instead of literal in mbe 2020-04-19 03:24:17 +08:00
ra_parser Align grammar for record patterns and literals 2020-04-12 00:00:15 +02:00
ra_proc_macro proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
ra_proc_macro_srv Fix typo 2020-04-20 22:07:47 +03:00
ra_prof Move timeit to stdx 2020-04-10 20:46:42 +02:00
ra_project_model Some clippy fixes 2020-04-19 15:15:49 -04:00
ra_syntax Merge #4038 2020-04-21 12:58:27 +00:00
ra_text_edit Remove some TextUnit->usize escapees 2020-03-12 22:33:27 -04:00
ra_tt Improve tt::Subtree debug print 2020-04-10 00:17:32 +08:00
rust-analyzer Merge #4093 2020-04-23 09:49:03 +00:00
stdx Move timeit to stdx 2020-04-10 20:46:42 +02:00
test_utils Make records grammar more orthogonal 2020-04-11 19:20:41 +02:00