about summary refs log tree commit diff
path: root/tests/ui/pattern
AgeCommit message (Collapse)AuthorLines
2023-10-01Evaluate float consts eagerlyNadrieril-15/+77
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-2/+2
2023-09-07fixes #114896surechen-0/+18
2023-09-03Improve clarity of diagnostic message on non-exhaustive matchesSebastian Toh-5/+5
2023-08-28Add note when matching on nested non-exhaustive enumsSebastian Toh-0/+42
2023-08-28Add note that str cannot be matched exhaustivelySebastian Toh-0/+31
2023-08-21Add note when matching on tuples/ADTs containing non-exhaustive typesSebastian Toh-0/+245
2023-07-28address reviewb-naber-1/+13
2023-07-17add more testsb-naber-25/+103
2023-07-17address reviewb-naber-3/+8
2023-07-17add test for nested patternb-naber-0/+15
2023-07-17add tests for refutable patternsb-naber-5/+172
2023-07-17add test, bless testsb-naber-0/+16
2023-07-01add regression testEric Mark Martin-0/+38
2023-06-28add comment backEric Mark Martin-1/+2
2023-06-28add note for non-exhaustive matches with guardsEric Mark Martin-24/+55
2023-06-24Revert "Structurally resolve correctly in check_pat_lit"Michael Goulet-0/+15
This reverts commit 54fb5a48b968b3a329ceeb57226d9ac60f983f04.
2023-05-31Only rewrite valtree-constants to patterns and keep other constants opaqueOli Scherer-2/+2
2023-05-29Rollup merge of #111558 - c410-f3r:t3st3ss, r=WaffleLapkinMatthias Krüger-0/+35
Move tests r? `@petrochenkov`
2023-05-25Add NOTE annotations.Camille GILLOT-75/+141
2023-05-25Add inter-crate test.Camille GILLOT-40/+75
2023-05-24Move testsCaio-0/+35
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-3/+3
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-2/+2
2023-05-16Auto merge of #105750 - oli-obk:valtrees, r=lcnrbors-40/+53
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-16Rollup merge of #111428 - bvanjoi:fix-109250, r=NilstriebNilstrieb-6/+9
refactor(resolve): clean up the early error return caused by non-call closes https://github.com/rust-lang/rust/issues/109250 It seems no bad happened, r? ``@Nilstrieb``
2023-05-15Always fall back to PartialEq when a constant in a pattern is not ↵Oli Scherer-40/+53
recursively structural-eq
2023-05-10Adjust tests for new drop and forget lintsUrgau-0/+9
2023-05-10refactor(resolve): clean up the early error return caused by non-callbohan-6/+9
2023-05-05tweak spans for `ref mut` suggestionEzra Shaw-2/+2
2023-05-01fix testsyukang-9/+6
2023-05-01Rip it outNilstrieb-15/+13
My type ascription Oh rip it out Ah If you think we live too much then You can sacrifice diagnostics Don't mix your garbage Into my syntax So many weird hacks keep diagnostics alive Yet I don't even step outside So many bad diagnostics keep tyasc alive Yet tyasc doesn't even bother to survive!
2023-04-21Run `check_match` and `check_liveness` when MIR is built instead of having ↵Oli Scherer-207/+207
an explicit phase for them
2023-04-03Reinstate confusion note.Camille GILLOT-0/+4
2023-04-03Perform match checking on THIR.Camille GILLOT-179/+179
2023-04-03Shrink binding span.Camille GILLOT-413/+273
2023-03-27Add notes to non-structural const in pattern error messageJamen Marz-0/+32
2023-03-15error-msg: impl better suggestion for `E0532`Ezra Shaw-0/+136
2023-03-13resolve: Remove `struct_field_names_untracked`Vadim Petrochenkov-2/+2
2023-01-30Modify primary span label for E0308Esteban Küber-12/+12
The previous output was unintuitive to users.
2023-01-26Rollup merge of #106978 - mejrs:mir_build3, r=davidtwcoMatthias Krüger-208/+208
Migrate mir_build's borrow conflicts This also changes the error message slightly, for two reasons: - I'm not a fan of saying "value borrowed, by `x`, here" - it simplifies the error implementation significantly.
2023-01-25Rollup merge of #106897 - estebank:issue-99430, r=davidtwcoMatthias Krüger-0/+2
Tweak E0597 CC #99430
2023-01-20Change `bindings_with_variant_name` to deny-by-default--global-29/+27
2023-01-17Migrate mir_build's borrow conflictsmejrs-208/+208
2023-01-15Tweak E0597Esteban Küber-0/+2
CC #99430
2023-01-14suggest fix for attempted integer identifier in patternsEzra Shaw-0/+42
2023-01-11Translate `Overlap` eagerlymejrs-0/+1
2023-01-11Don't recommend `if let` if `let else` worksmejrs-10/+2
2023-01-11Migrate pattern matchingmejrs-59/+65
2023-01-11Migrate deconstruct_pat.rsmejrs-1/+0