rust/tests/ui/pattern/deref-patterns/usefulness
dianne fb261a179d error early when mixing deref patterns with normal constructors
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 18:53:55 -07:00
..
empty-types.rs
empty-types.stderr
mixed-constructors.rs error early when mixing deref patterns with normal constructors 2025-05-06 18:53:55 -07:00
mixed-constructors.stderr error early when mixing deref patterns with normal constructors 2025-05-06 18:53:55 -07:00
non-exhaustive.rs
non-exhaustive.stderr
unreachable-patterns.rs
unreachable-patterns.stderr