bors[bot] 467a040509
Merge #3623
3623: 'Fill match arms' should work with existing match arms r=matklad a=slyngbaek

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

Co-authored-by: Steffen Lyngbaek <steffenlyngbaek@gmail.com>
2020-03-20 08:26:15 +00:00
..
2020-03-19 11:49:01 -07:00
2020-03-19 14:17:34 -07:00
2020-03-16 18:46:08 +01:00
2020-03-20 08:50:34 +01:00
2020-03-20 08:50:34 +01:00
2020-03-19 17:53:31 +01:00
2020-03-13 12:20:42 +01:00