rust/crates
Steffen Lyngbaek 6087c01460 'Fill match arms' should work with existing match arms
Addresses #3039

This essentially adds missing match arms. The algorithm for this
can get complicated rather quickly so bail in certain conditions
and rely on a PlaceholderPat.

The algorighm works as such:
- Iterate through the Enum Def Variants
- Attempt to see if the variant already exists as a match arm
- If yes, skip the enum variant. If no, include it.
- If it becomes complicated, rather than exhaustively deal with every
  branch, mark it as a "partial match" and simply include the
  placeholder.

  Conditions for "complication":
  - The match arm contains a match guard
  - Any kind of nested destrucuring

Order the resulting merged match branches as such:
1. Provided match arms
2. Missing enum variant branch arms
3. End with Placeholder if required

- Add extra tests
2020-03-19 11:47:33 -07:00
..
ra_arena Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
ra_assists 'Fill match arms' should work with existing match arms 2020-03-19 11:47:33 -07:00
ra_cargo_watch Use dyn-ref instead of impl to impact compile times the least 2020-03-17 14:56:53 +01:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Support loading OUT_DIR from cargo check at launch 2020-03-17 14:47:05 +01:00
ra_fmt When joining lines, unwrap trivial diverging blocks 2020-02-24 17:17:05 +01:00
ra_hir Use dyn Trait for working with databse 2020-03-16 17:42:30 +01:00
ra_hir_def Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
ra_hir_expand Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
ra_hir_ty Make MBE expansion more resilient (WIP) 2020-03-16 18:38:19 +01:00
ra_ide Check that no file contains trailing ws 2020-03-17 11:42:54 +01:00
ra_ide_db Use dyn Trait for working with databse 2020-03-16 17:42:30 +01:00
ra_mbe Small fixes 2020-03-16 18:46:08 +01:00
ra_parser Better fix for stuck parser? 2020-03-16 18:38:19 +01:00
ra_prof Allow specifying additional info on call to profile 2020-03-06 17:36:51 +01:00
ra_project_model Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
ra_syntax Generalize 2020-03-19 11:38:26 +01:00
ra_text_edit Remove some TextUnit->usize escapees 2020-03-12 22:33:27 -04:00
ra_tt Make MBE expansion more resilient (WIP) 2020-03-16 18:38:19 +01:00
rust-analyzer More direct CargoWorkspace 2020-03-19 17:53:31 +01:00
test_utils Move verbose tests out of line 2020-03-13 12:20:42 +01:00