rust/tests/ui/pattern/deref-patterns
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
..
usefulness error early when mixing deref patterns with normal constructors 2025-05-06 18:53:55 -07:00
bindings.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00
branch.rs pattern typing for immutable implicit deref patterns 2025-04-16 14:42:56 -07:00
byte-string-type-errors.rs always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
byte-string-type-errors.stderr always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
cant_move_out_of_pattern.rs move existing tests away from using boxes 2025-04-24 14:25:27 -07:00
cant_move_out_of_pattern.stderr move existing tests away from using boxes 2025-04-24 14:25:27 -07:00
closure_capture.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00
const-pats-do-not-mislead-inference.rs always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
const-pats-do-not-mislead-inference.stable.stderr always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
deref-box.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00
dont-ice-on-slice-in-deref-pat-in-closure.rs EUV: fix place of deref pattern's interior's scrutinee 2025-03-13 01:01:26 -07:00
fake_borrows.rs move existing tests away from using boxes 2025-04-24 14:25:27 -07:00
fake_borrows.stderr move existing tests away from using boxes 2025-04-24 14:25:27 -07:00
implicit-const-deref.rs don't peel ADTs the pattern could match 2025-04-16 15:42:12 -07:00
implicit-const-deref.stderr don't peel ADTs the pattern could match 2025-04-16 15:42:12 -07:00
implicit-cow-deref.rs let deref patterns participate in usefulness/exhaustiveness 2025-05-06 18:53:55 -07:00
needs-gate.rs always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
needs-gate.stderr always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
recursion-limit.rs respect the tcx's recursion limit when peeling 2025-04-16 15:42:12 -07:00
recursion-limit.stderr respect the tcx's recursion limit when peeling 2025-04-16 15:42:12 -07:00
ref-mut.rs register DerefMut bounds for implicit mutable derefs 2025-04-16 14:42:56 -07:00
ref-mut.stderr register DerefMut bounds for implicit mutable derefs 2025-04-16 14:42:56 -07:00
strings.rs always peel &mut, to allow matching on &mut str 2025-05-05 04:29:33 -07:00
typeck_fail.rs match ergonomics for string and byte string literal patterns 2025-05-05 04:10:49 -07:00
typeck_fail.stderr match ergonomics for string and byte string literal patterns 2025-05-05 04:10:49 -07:00
typeck.rs pattern typing for immutable implicit deref patterns 2025-04-16 14:42:56 -07:00
unsatisfied-bounds.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
unsatisfied-bounds.stderr pattern typing for immutable implicit deref patterns 2025-04-16 14:42:56 -07:00