diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-23 16:35:31 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-23 16:35:31 +0100 |
commit | 278bf351e3d9bf074b76f89afa04c4727d55fba6 (patch) | |
tree | 5c0dcf6a4e47a90f1d650fd7c33a6438a4bc3262 /crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs | |
parent | 4a18509a98149fb3d5c73dbf0c6de4cfa8d4596c (diff) | |
parent | dfde73ef90194f90704287876f0e5d3b0cfa2b11 (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/reparse/fuzz-failures/0003.rs')
0 files changed, 0 insertions, 0 deletions