rust/tests/ui/pattern
bors 9239760da8 Auto merge of #105750 - oli-obk:valtrees, r=lcnr
Always fall back to PartialEq when a constant in a pattern is not recursively structural-eq

Right now we destructure the constant as far as we can, but with this PR we just don't take it apart anymore. This is preparatory work for moving to always using valtrees, as these will just do a single conversion of the constant to a valtree at the start, and if that fails, fall back to `PartialEq`.

This removes a few cases where we emitted the `unreachable pattern` lint, because we stop looking into the constant deeply enough to detect that a constant is already covered by another pattern.

Previous work: https://github.com/rust-lang/rust/pull/70743

This is groundwork towards fixing https://github.com/rust-lang/rust/issues/83085 and https://github.com/rust-lang/rust/issues/105047
2023-05-16 13:10:24 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bindings-after-at Adjust tests for new drop and forget lints 2023-05-10 19:36:02 +02:00
move-ref-patterns Adjust tests for new drop and forget lints 2023-05-10 19:36:02 +02:00
usefulness Always fall back to PartialEq when a constant in a pattern is not recursively structural-eq 2023-05-15 14:20:31 +00:00
for-loop-bad-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
for-loop-bad-item.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
ignore-all-the-things.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
integer-range-binding.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6449.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-8351-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-8351-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-10392.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-11577.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-12582.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-14221.rs Change bindings_with_variant_name to deny-by-default 2023-01-20 02:26:12 -05:00
issue-14221.stderr Change bindings_with_variant_name to deny-by-default 2023-01-20 02:26:12 -05:00
issue-15080.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17718-patterns.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17718-patterns.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-22546.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27320.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52240.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52240.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-66270-pat-struct-parser-recovery.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-66270-pat-struct-parser-recovery.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67037-pat-tup-scrut-ty-diff-less-fields.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-67776-match-same-name-enum-variant-refs.rs Change bindings_with_variant_name to deny-by-default 2023-01-20 02:26:12 -05:00
issue-67776-match-same-name-enum-variant-refs.stderr Change bindings_with_variant_name to deny-by-default 2023-01-20 02:26:12 -05:00
issue-68393-let-pat-assoc-constant.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-68393-let-pat-assoc-constant.stderr Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
issue-72565.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72565.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72574-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72574-1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72574-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72574-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74539.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74539.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74702.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74702.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74954.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80186-mut-binding-help-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80186-mut-binding-help-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88074-pat-range-type-inference-err.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88074-pat-range-type-inference-err.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88074-pat-range-type-inference.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92074-macro-ice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92074-macro-ice.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-95878.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-95878.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-106552.rs suggest fix for attempted integer identifier in patterns 2023-01-14 12:51:20 +13:00
issue-106552.stderr Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
issue-106862.fixed error-msg: impl better suggestion for E0532 2023-03-15 22:19:54 +13:00
issue-106862.rs error-msg: impl better suggestion for E0532 2023-03-15 22:19:54 +13:00
issue-106862.stderr error-msg: impl better suggestion for E0532 2023-03-15 22:19:54 +13:00
non-constant-in-const-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-constant-in-const-path.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-structural-match-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-structural-match-types.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-shadow-in-nested-binding.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-shadow-in-nested-binding.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-struct-field-expr-has-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-struct-field-expr-has-type.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
pat-tuple-bad-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-bad-type.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-field-count-cross.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-field-count-cross.stderr resolve: Remove struct_field_names_untracked 2023-03-13 17:31:55 +04:00
pat-tuple-overfield.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-overfield.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-underfield.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-tuple-underfield.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-type-err-formal-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-type-err-formal-param.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
pat-type-err-let-stmt.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pat-type-err-let-stmt.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
patkind-litrange-no-expr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
patkind-litrange-no-expr.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-binding-disambiguation.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-binding-disambiguation.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-error-continue.rs Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
pattern-error-continue.stderr refactor(resolve): clean up the early error return caused by non-call 2023-05-10 22:35:01 +08:00
pattern-ident-path-generics.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-ident-path-generics.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
pattern-tyvar-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-tyvar-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-tyvar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pattern-tyvar.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
rest-pat-semantic-disallowed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rest-pat-semantic-disallowed.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rest-pat-syntactic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rest-pat-syntactic.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
size-and-align.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-adding-appropriate-missing-pattern-excluding-comments.fixed Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
suggest-adding-appropriate-missing-pattern-excluding-comments.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-adding-appropriate-missing-pattern-excluding-comments.stderr Perform match checking on THIR. 2023-04-03 15:59:21 +00:00