diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-22 18:03:51 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-22 18:03:51 +0000 |
commit | 4a2f60cb7b83e9ef95d97201d210ff6943b660eb (patch) | |
tree | 365de67418685046fdddb1445efab6552cbeb625 /.github/workflows/rustdoc.yaml | |
parent | 94f661c62a41674d9ee04c2f3cd030d639acc926 (diff) | |
parent | 83121efcd577124a992dc8bd304690b36bda2931 (diff) |
Merge #6964
6964: Add full pattern completions for Struct and Variant patterns r=matklad a=Veykril
Just gonna call it full pattern completion as pattern completion is already implemented in a sense by showing idents in pattern position. What this does is basically complete struct and variant patterns where applicable(function params, let statements and refutable pattern locations).
This does not replace just completing the corresponding idents of the structs and variants, instead two completions are shown for these, a completion for the ident itself and a completion for the pattern(if the pattern make sense to be used that is). I figured in some cases one would rather type out the pattern manually if it has a lot of fields but you only care about one since this completion would cause one more work in the end since you would have to delete all the extra matched fields again.
These completions are tagged as `CompletionKind::Snippet`, not sure if that is the right one here.
<details>
<summary>some gifs</summary>
![dx2lxgzhj3](https://user-images.githubusercontent.com/3757771/102719967-6987ef80-42f1-11eb-8ae0-8aff53777860.gif)
![EP2E7sJLkB](https://user-images.githubusercontent.com/3757771/102785777-c7264580-439e-11eb-8a64-f142e19fb65b.gif)
![JMNHHWknr9](https://user-images.githubusercontent.com/3757771/102785796-d1e0da80-439e-11eb-934b-218ada31b51c.gif)
</details>
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to '.github/workflows/rustdoc.yaml')
0 files changed, 0 insertions, 0 deletions