rust-analyzer/crates/ide-diagnostics
bors 642084093a Auto merge of #12634 - iDawer:match-check.witnesses, r=flodiebold
feat: Show witnesses of non-exhaustiveness in `missing-match-arm` diagnostic

Shamelessly copied from rustc. Thus reporting format is same.

This extends public api  `hir::diagnostics::MissingMatchArms` with `uncovered_patterns: String` field. It does not expose data for implementing a quick fix yet.

-----
Worth to note: current implementation does not give a comprehensive list of missing patterns. Also mentioned in [paper](http://moscova.inria.fr/~maranget/papers/warn/warn.pdf):

> One may think that algorithm I should make an additional effort to provide more
> non-matching values, by systematically computing recursive calls on specialized
> matrices when possible, and by returning a list of all pattern vectors returned by
> recursive calls. We can first observe that it is not possible in general to supply the
> users with all non-matching values, since the signature of integers is (potentially)
> infinite.
2022-06-30 14:51:58 +00:00
..
src Auto merge of #12634 - iDawer:match-check.witnesses, r=flodiebold 2022-06-30 14:51:58 +00:00
Cargo.toml internal: Bump Dependencies 2022-06-10 17:30:02 +02:00