rust/tests/ui/pattern/usefulness
bors 5fe5543502 Auto merge of #124661 - RalfJung:only-structural-consts-in-patterns, r=pnkfelix
Turn remaining non-structural-const-in-pattern lints into hard errors

This completes the implementation of https://github.com/rust-lang/rust/issues/120362 by turning our remaining future-compat lints into hard errors: indirect_structural_match and pointer_structural_match.

They have been future-compat lints for a while (indirect_structural_match for many years, pointer_structural_match since Rust 1.75 (released Dec 28, 2023)), and have shown up in dependency breakage reports since Rust 1.78 (just released on May 2, 2024). I don't expect a lot of code will still depend on them, but we will of course do a crater run.

A lot of cleanup is now possible in const_to_pat, but that is deferred to a later PR.

Fixes https://github.com/rust-lang/rust/issues/70861
2024-05-26 07:55:47 +00:00
..
auxiliary
integer-ranges Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
always-inhabited-union-ref.exhaustive_patterns.stderr
always-inhabited-union-ref.min_exhaustive_patterns.stderr
always-inhabited-union-ref.rs Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors 2024-02-23 17:02:03 +01:00
conflicting_bindings.rs
conflicting_bindings.stderr
const-partial_eq-fallback-ice.rs
const-partial_eq-fallback-ice.stderr remove IndirectStructuralMatch lint, emit the usual hard error instead 2024-05-03 15:56:59 +02:00
const-pat-ice.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-private-fields.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
consts-opaque.rs turn pointer_structural_match into a hard error 2024-05-03 15:56:59 +02:00
consts-opaque.stderr turn pointer_structural_match into a hard error 2024-05-03 15:56:59 +02:00
deny-irrefutable-let-patterns.rs
deny-irrefutable-let-patterns.stderr
doc-hidden-fields.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
doc-hidden-fields.stderr
doc-hidden-non-exhaustive.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
doc-hidden-non-exhaustive.stderr
empty-match-check-notes.exhaustive_patterns.stderr
empty-match-check-notes.normal.stderr
empty-match-check-notes.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
empty-match.exhaustive_patterns.stderr
empty-match.normal.stderr
empty-match.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
empty-types.exhaustive_patterns.stderr Run the empty_types tests with never_patterns too 2024-03-12 21:38:30 +01:00
empty-types.min_exh_pats.stderr Run the empty_types tests with never_patterns too 2024-03-12 21:38:30 +01:00
empty-types.never_pats.stderr Don't suggest an arm when suggesting a never pattern 2024-03-12 21:38:31 +01:00
empty-types.normal.stderr Run the empty_types tests with never_patterns too 2024-03-12 21:38:30 +01:00
empty-types.rs Suggest never pattern instead of _ for empty types 2024-03-12 21:38:30 +01:00
floats.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
floats.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
guards.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
guards.stderr Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
impl-trait.rs Prefer min_exhaustive_patterns in tests 2024-02-13 16:45:53 +01:00
impl-trait.stderr
irrefutable-let-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
irrefutable-unit.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-2111.rs
issue-2111.stderr
issue-3096-1.rs
issue-3096-1.stderr
issue-3096-2.rs
issue-3096-2.stderr
issue-3601.rs
issue-3601.stderr
issue-4321.rs
issue-4321.stderr
issue-12116.rs
issue-12116.stderr
issue-12369.rs
issue-12369.stderr
issue-13727.rs
issue-13727.stderr
issue-15129.rs
issue-15129.stderr
issue-30240-b.rs
issue-30240-b.stderr
issue-30240-rpass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-30240.rs
issue-30240.stderr
issue-31221.rs
issue-31221.stderr
issue-31561.rs
issue-31561.stderr
issue-35609.rs
issue-35609.stderr
issue-39362.rs
issue-39362.stderr
issue-40221.rs
issue-40221.stderr
issue-50900.rs
issue-50900.stderr
issue-53820-slice-pattern-large-array.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-56379.rs
issue-56379.stderr
issue-57472.rs
issue-57472.stderr
issue-65413-constants-and-slices-exhaustiveness.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66501.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71930-type-of-match-scrutinee.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72377.rs
issue-72377.stderr
issue-72476-and-89393-associated-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-78123-non-exhaustive-reference.rs
issue-78123-non-exhaustive-reference.stderr
issue-78549-ref-pat-and-str.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80501-or-pat-and-macro.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-82772-match-box-as-struct.rs
issue-82772-match-box-as-struct.stderr
issue-85222-types-containing-non-exhaustive-types.rs
issue-85222-types-containing-non-exhaustive-types.stderr
issue-88747.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-105479-str-non-exhaustiveness.rs
issue-105479-str-non-exhaustiveness.stderr
issue-118437-exponential-time-on-diagonal-match.rs Add and update tests to use pattern_complexity 2024-03-03 13:10:15 +01:00
issue-119493-type-error-ice.rs
issue-119493-type-error-ice.stderr
issue-119778-type-error-ice.rs
issue-119778-type-error-ice.stderr
match-arm-statics-2.rs
match-arm-statics-2.stderr
match-arm-statics.rs
match-arm-statics.stderr
match-byte-array-patterns-2.rs
match-byte-array-patterns-2.stderr
match-byte-array-patterns.rs
match-byte-array-patterns.stderr
match-non-exhaustive.rs
match-non-exhaustive.stderr
match-privately-empty.exhaustive_patterns.stderr
match-privately-empty.min_exhaustive_patterns.stderr
match-privately-empty.rs Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors 2024-02-23 17:02:03 +01:00
match-ref-ice.rs
match-ref-ice.stderr
match-slice-patterns.rs
match-slice-patterns.stderr
match-vec-fixed.rs
match-vec-fixed.stderr
match-vec-unreachable.rs
match-vec-unreachable.stderr
nested-exhaustive-match.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested-non-exhaustive-enums.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested-non-exhaustive-enums.stderr
non-exhaustive-defined-here.rs
non-exhaustive-defined-here.stderr
non-exhaustive-match-nested.rs
non-exhaustive-match-nested.stderr
non-exhaustive-match.rs
non-exhaustive-match.stderr
non-exhaustive-pattern-witness.rs
non-exhaustive-pattern-witness.stderr
refutable-pattern-errors.rs
refutable-pattern-errors.stderr
refutable-pattern-in-fn-arg.rs
refutable-pattern-in-fn-arg.stderr
slice_of_empty.exhaustive_patterns.stderr
slice_of_empty.min_exhaustive_patterns.stderr
slice_of_empty.rs Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors 2024-02-23 17:02:03 +01:00
slice-pattern-const-2.rs
slice-pattern-const-2.stderr
slice-pattern-const-3.rs
slice-pattern-const-3.stderr
slice-pattern-const.rs
slice-pattern-const.stderr
slice-patterns-exhaustiveness.rs
slice-patterns-exhaustiveness.stderr
slice-patterns-irrefutable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
slice-patterns-reachability.rs
slice-patterns-reachability.stderr
stable-gated-fields.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
stable-gated-fields.stderr
stable-gated-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
stable-gated-patterns.stderr
struct-like-enum-nonexhaustive.rs
struct-like-enum-nonexhaustive.stderr
struct-pattern-match-useless.rs
struct-pattern-match-useless.stderr
top-level-alternation.rs
top-level-alternation.stderr
tuple-struct-nonexhaustive.rs
tuple-struct-nonexhaustive.stderr
type_polymorphic_byte_str_literals.rs
type_polymorphic_byte_str_literals.stderr
uninhabited.rs Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors 2024-02-23 17:02:03 +01:00
unions.rs Fix union handling in exhaustiveness 2024-04-01 00:01:46 +02:00
unions.stderr Fix union handling in exhaustiveness 2024-04-01 00:01:46 +02:00
unstable-gated-fields.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unstable-gated-fields.stderr
unstable-gated-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unstable-gated-patterns.stderr