Commit Graph

4 Commits

Author SHA1 Message Date
Nadrieril
d93c1b320c Introduce new FixedLenSlice constructor
It is used in the case where a variable-length slice pattern is used to
match on an array of known size. This allows considering only those
entries in the array that are captured by one of the patterns.
As a side-effect, diagnostics improve a bit for those cases.
2019-11-16 16:43:20 +00:00
Nadrieril
65bc67e8d9 Make exhaustiveness error message more consistent for slice patterns
This improves error messages by indicating when slices above a certain
lengths have not been matched. Previously, we would only report examples
of such lengths, but of course never all of them.
2019-11-05 17:59:01 +00:00
Nadrieril
b66973043e Don't use max_slice_length when subtracting from VarLenSlice
This alters error messages slightly, but that'll be improved later
2019-11-05 17:59:01 +00:00
Nadrieril
09f9947ebc Gather together usefulness tests
I took most tests that were testing only for match exhaustiveness,
pattern refutability or match arm reachability, and put them in
the same test folder.
2019-10-27 21:20:26 +00:00