rust/compiler/rustc_pattern_analysis/src
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
..
rustc compiler: Add rustc_abi dependence to the compiler 2024-10-27 21:10:58 -07:00
constructor.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00
errors.rs error early when mixing deref patterns with normal constructors 2025-05-06 18:53:55 -07:00
lib.rs Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
lints.rs Remove LintExpectationId from Level variants 2025-04-03 09:22:21 +00:00
pat.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
pat_column.rs Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
rustc.rs error early when mixing deref patterns with normal constructors 2025-05-06 18:53:55 -07:00
usefulness.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00