| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-12-20 | Reveal opaque types in exhaustiveness checking | Nadrieril | -9/+39 | |
| 2023-12-20 | Add tests | Nadrieril | -0/+217 | |
| 2023-12-09 | Don't warn an empty pattern unreachable if we're not sure the data is valid | Nadrieril | -597/+87 | |
| 2023-12-09 | Test empty types better | Nadrieril | -489/+2595 | |
| 2023-12-04 | Remove the `precise_pointer_size_matching` feature gate | Nadrieril | -63/+24 | |
| 2023-11-26 | Auto merge of #117611 - Nadrieril:linear-pass-take-4, r=cjgillot | bors | -91/+120 | |
| Rewrite exhaustiveness in one pass This is at least my 4th attempt at this in as many years x) Previous attempts were all too complicated or too slow. But we're finally here! The previous version of the exhaustiveness algorithm computed reachability for each arm then exhaustiveness of the whole match. Since each of these steps does roughly the same things, this rewrites the algorithm to do them all in one go. I also think this makes things much simpler. I also rewrote the documentation of the algorithm in depth. Hopefully it's up-to-date and easier to follow now. Plz comment if anything's unclear. r? `@oli-obk` I think you're one of the rare other people to understand the exhaustiveness algorithm? cc `@varkor` I know you're not active anymore, but if you feel like having a look you might enjoy this :D Fixes https://github.com/rust-lang/rust/issues/79307 | ||||
| 2023-11-24 | Show number in error message even for one error | Nilstrieb | -31/+31 | |
| Co-authored-by: Adrian <adrian.iosdev@gmail.com> | ||||
| 2023-11-22 | Fully rework the algorithm and its explanation | Nadrieril | -27/+34 | |
| 2023-11-22 | Keep rows with guards in the matrix | Nadrieril | -14/+14 | |
| 2023-11-22 | Add some tests | Nadrieril | -55/+77 | |
| 2023-11-08 | Auto merge of #116930 - RalfJung:raw-ptr-match, r=davidtwco | bors | -14/+94 | |
| patterns: reject raw pointers that are not just integers Matching against `0 as *const i32` is fine, matching against `&42 as *const i32` is not. This extends the existing check against function pointers and wide pointers: we now uniformly reject all these pointer types during valtree construction, and then later lint because of that. See [here](https://github.com/rust-lang/rust/pull/116930#issuecomment-1784654073) for some more explanation and context. Also fixes https://github.com/rust-lang/rust/issues/116929. Cc `@oli-obk` `@lcnr` | ||||
| 2023-11-03 | Tweak spans for "adt defined here" note | Nadrieril | -134/+148 | |
| 2023-11-02 | Always do all the pattern checks | Nadrieril | -4/+22 | |
| 2023-11-02 | Add regression test for pattern checks | Nadrieril | -0/+72 | |
| 2023-11-02 | Tweak diagnostic for consistency | Nadrieril | -57/+109 | |
| 2023-10-28 | make pointer_structural_match warn-by-default | Ralf Jung | -14/+94 | |
| 2023-10-27 | Match usize/isize exhaustively | Nadrieril | -243/+194 | |
| 2023-10-27 | Add tests | Nadrieril | -14/+80 | |
| 2023-10-27 | Lint overlapping ranges as a separate pass | Nadrieril | -15/+58 | |
| 2023-10-14 | Skip most of check_match checks in the presence of `PatKind::Error` | Nadrieril | -34/+9 | |
| 2023-10-12 | Auto merge of #116391 - Nadrieril:constructorset, r=cjgillot | bors | -0/+61 | |
| exhaustiveness: Rework constructor splitting `SplitWildcard` was pretty opaque. I replaced it with a more legible abstraction: `ConstructorSet` represents the set of constructors for patterns of a given type. This clarifies responsibilities: `ConstructorSet` handles one clear task, and diagnostic-related shenanigans can be done separately. I'm quite excited, I had has this in mind for years but could never quite introduce it. This opens up possibilities, including type-specific optimisations (like using a `FxHashSet` to collect enum variants, which had been [hackily attempted some years ago](https://github.com/rust-lang/rust/pull/76918)), my one-pass rewrite (https://github.com/rust-lang/rust/pull/116042), and future librarification. | ||||
| 2023-10-11 | Prevent spurious `unreachable pattern` lints | Oli Scherer | -138/+28 | |
| Means you'll get more `non-exhaustive` patterns | ||||
| 2023-10-05 | Fix handling slices of empty types | Nadrieril | -0/+61 | |
| 2023-10-01 | Evaluate float consts eagerly | Nadrieril | -15/+77 | |
| 2023-09-03 | Improve clarity of diagnostic message on non-exhaustive matches | Sebastian Toh | -5/+5 | |
| 2023-08-28 | Add note when matching on nested non-exhaustive enums | Sebastian Toh | -0/+42 | |
| 2023-08-28 | Add note that str cannot be matched exhaustively | Sebastian Toh | -0/+31 | |
| 2023-08-21 | Add note when matching on tuples/ADTs containing non-exhaustive types | Sebastian Toh | -0/+245 | |
| 2023-06-28 | add comment back | Eric Mark Martin | -1/+2 | |
| 2023-06-28 | add note for non-exhaustive matches with guards | Eric Mark Martin | -24/+55 | |
| 2023-05-25 | Add NOTE annotations. | Camille GILLOT | -75/+141 | |
| 2023-05-25 | Add inter-crate test. | Camille GILLOT | -40/+75 | |
| 2023-05-15 | Always fall back to PartialEq when a constant in a pattern is not ↵ | Oli Scherer | -40/+53 | |
| recursively structural-eq | ||||
| 2023-04-03 | Reinstate confusion note. | Camille GILLOT | -0/+4 | |
| 2023-04-03 | Perform match checking on THIR. | Camille GILLOT | -168/+168 | |
| 2023-03-27 | Add notes to non-structural const in pattern error message | Jamen Marz | -0/+32 | |
| 2023-01-11 | Translate `Overlap` eagerly | mejrs | -0/+1 | |
| 2023-01-11 | Don't recommend `if let` if `let else` works | mejrs | -10/+2 | |
| 2023-01-11 | Migrate pattern matching | mejrs | -59/+65 | |
| 2023-01-11 | Migrate deconstruct_pat.rs | mejrs | -1/+0 | |
| 2023-01-11 | Move /src/test to /tests | Albert Larsan | -0/+6440 | |
