| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2025-07-28 | In rustc_pattern_analysis, put `true` witnesses before `false` witnesses | Chayim Refael Friedman | -4/+4 | |
| In rustc it doesn't really matter what the order of the witnesses is, but I'm planning to use the witnesses for implementing the "add missing match arms" assist in rust-analyzer, and there `true` before `false` is the natural order (like `Some` before `None`), and also what the current assist does. The current order doesn't seem to be intentional; the code was created when bool ctors became their own thing, not just int ctors, but for integer, 0 before 1 is indeed the natural order. | ||||
| 2025-05-06 | error early when mixing deref patterns with normal constructors | dianne | -0/+91 | |
| Without adding proper support for mixed exhaustiveness, mixing deref patterns with normal constructors would either violate `ConstructorSet::split`'s invariant 4 or 7. We'd either be ignoring rows with normal constructors or we'd have problems in unspecialization from non-disjoint constructors. Checking mixed exhaustivenss similarly to how unions are currently checked should work, but the diagnostics for unions are confusing. Since mixing deref patterns with normal constructors is pretty niche (currently it only makes sense for `Cow`), emitting an error lets us avoid committing to supporting mixed exhaustiveness without a good answer for the diagnostics. | ||||
| 2025-05-06 | add exhaustiveness/usefulness tests for deref patterns | dianne | -0/+269 | |
