rust/tests/ui/pattern/usefulness
Matthias Krüger 958417fba1
Rollup merge of #119554 - matthewjasper:remove-guard-distinction, r=compiler-errors
Fix scoping for let chains in match guards

If let guards were previously represented as a different type of guard in HIR and THIR. This meant that let chains in match guards were not handled correctly because they were treated exactly like normal guards.

- Remove `hir::Guard` and `thir::Guard`.
- Make the scoping different between normal guards and if let guards also check for let chains.

closes #118593
2024-01-05 20:39:52 +01:00
..
auxiliary
integer-ranges Remove the precise_pointer_size_matching feature gate 2023-12-04 11:56:21 +01:00
always-inhabited-union-ref.rs
always-inhabited-union-ref.stderr
conflicting_bindings.rs
conflicting_bindings.stderr
const-partial_eq-fallback-ice.rs
const-partial_eq-fallback-ice.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-pat-ice.rs
const-private-fields.rs
consts-opaque.rs
consts-opaque.stderr
deny-irrefutable-let-patterns.rs
deny-irrefutable-let-patterns.stderr Remove hir::Guard 2024-01-05 10:56:59 +00:00
doc-hidden-fields.rs
doc-hidden-fields.stderr
doc-hidden-non-exhaustive.rs
doc-hidden-non-exhaustive.stderr
empty-match-check-notes.exhaustive_patterns.stderr Test empty types better 2023-12-09 00:39:59 +01:00
empty-match-check-notes.normal.stderr Test empty types better 2023-12-09 00:39:59 +01:00
empty-match-check-notes.rs Test empty types better 2023-12-09 00:39:59 +01:00
empty-match.exhaustive_patterns.stderr Test empty types better 2023-12-09 00:39:59 +01:00
empty-match.normal.stderr Test empty types better 2023-12-09 00:39:59 +01:00
empty-match.rs Test empty types better 2023-12-09 00:39:59 +01:00
empty-types.exhaustive_patterns.stderr Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +01:00
empty-types.normal.stderr Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +01:00
empty-types.rs Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +01:00
floats.rs
floats.stderr
guards.rs
guards.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
impl-trait.rs Reveal empty opaques in depth 2023-12-23 14:59:12 +01:00
impl-trait.stderr Reveal empty opaques in depth 2023-12-23 14:59:12 +01:00
irrefutable-let-patterns.rs
irrefutable-unit.rs
issue-2111.rs
issue-2111.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3096-1.rs
issue-3096-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3096-2.rs
issue-3096-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3601.rs Keep rows with guards in the matrix 2023-11-22 03:25:15 +01:00
issue-3601.stderr Auto merge of #117611 - Nadrieril:linear-pass-take-4, r=cjgillot 2023-11-26 00:14:14 +00:00
issue-4321.rs
issue-4321.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-12116.rs
issue-12116.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-12369.rs
issue-12369.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-13727.rs
issue-13727.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-15129.rs
issue-15129.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30240-b.rs
issue-30240-b.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30240-rpass.rs
issue-30240.rs
issue-30240.stderr
issue-31221.rs
issue-31221.stderr
issue-31561.rs
issue-31561.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-35609.rs
issue-35609.stderr
issue-39362.rs
issue-39362.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-40221.rs
issue-40221.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-50900.rs
issue-50900.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-53820-slice-pattern-large-array.rs
issue-56379.rs
issue-56379.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-57472.rs Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
issue-57472.stderr Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
issue-65413-constants-and-slices-exhaustiveness.rs
issue-66501.rs
issue-71930-type-of-match-scrutinee.rs
issue-72377.rs
issue-72377.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-72476-and-89393-associated-type.rs
issue-78123-non-exhaustive-reference.rs
issue-78123-non-exhaustive-reference.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-78549-ref-pat-and-str.rs
issue-80501-or-pat-and-macro.rs
issue-82772-match-box-as-struct.rs
issue-82772-match-box-as-struct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-85222-types-containing-non-exhaustive-types.rs
issue-85222-types-containing-non-exhaustive-types.stderr Remove the precise_pointer_size_matching feature gate 2023-12-04 11:56:21 +01:00
issue-88747.rs
issue-105479-str-non-exhaustiveness.rs
issue-105479-str-non-exhaustiveness.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-118437-exponential-time-on-diagonal-match.rs Improve performance on wide matches 2023-12-23 13:11:38 +01:00
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 Keep rows with guards in the matrix 2023-11-22 03:25:15 +01:00
match-privately-empty.rs
match-privately-empty.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
match-ref-ice.rs
match-ref-ice.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
match-slice-patterns.rs
match-slice-patterns.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
match-vec-fixed.rs
match-vec-fixed.stderr
match-vec-unreachable.rs
match-vec-unreachable.stderr
nested-exhaustive-match.rs
nested-non-exhaustive-enums.rs
nested-non-exhaustive-enums.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
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 Show number in error message even for one error 2023-11-24 19:15:52 +01:00
slice_of_empty.rs Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +01:00
slice_of_empty.stderr Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +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 Keep rows with guards in the matrix 2023-11-22 03:25:15 +01:00
slice-patterns-exhaustiveness.stderr Keep rows with guards in the matrix 2023-11-22 03:25:15 +01:00
slice-patterns-irrefutable.rs
slice-patterns-reachability.rs
slice-patterns-reachability.stderr
stable-gated-fields.rs
stable-gated-fields.stderr
stable-gated-patterns.rs
stable-gated-patterns.stderr
struct-like-enum-nonexhaustive.rs
struct-like-enum-nonexhaustive.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
struct-pattern-match-useless.rs
struct-pattern-match-useless.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
top-level-alternation.rs
top-level-alternation.stderr
tuple-struct-nonexhaustive.rs
tuple-struct-nonexhaustive.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
type_polymorphic_byte_str_literals.rs
type_polymorphic_byte_str_literals.stderr
uninhabited.rs
unstable-gated-fields.rs
unstable-gated-fields.stderr
unstable-gated-patterns.rs
unstable-gated-patterns.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00