| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2025-07-20 | List all the variants of non-exhaustive enums in exhaustive mode | Nadrieril | -1/+2 | |
| 2025-07-20 | pattern_analysis: add option to get a full set of witnesses | Nadrieril | -1/+3 | |
| 2025-07-04 | only check for mixed deref/normal constructors when needed | dianne | -1/+3 | |
| 2025-07-04 | always check for mixed deref pattern and normal constructors | dianne | -1/+4 | |
| This makes it work for box patterns and in rust-analyzer. | ||||
| 2025-07-03 | setup CI and tidy to use typos for spellchecking and fix few typos | klensy | -2/+2 | |
| 2025-05-06 | let deref patterns participate in usefulness/exhaustiveness | dianne | -1/+3 | |
| This does not yet handle the case of mixed deref patterns with normal constructors; it'll ICE in `Constructor::is_covered_by`. That'll be fixed in a later commit. | ||||
| 2025-02-22 | Greatly simplify lifetime captures in edition 2024 | Michael Goulet | -14/+11 | |
| 2025-02-17 | Add `pattern_complexity_limit` to `Limits`. | Nicholas Nethercote | -8/+9 | |
| It's similar to the other limits, e.g. obtained via `get_limit`. So it makes sense to handle it consistently with the other limits. We now use `Limit`/`usize` in most places instead of `Option<usize>`, so we use `Limit::new(usize::MAX)`/`usize::MAX` to emulate how `None` used to work. The commit also adds `Limit::unlimited`. | ||||
| 2025-01-11 | rename `BitSet` to `DenseBitSet` | Rémy Rakic | -7/+7 | |
| This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails. | ||||
| 2024-09-22 | Reformat using the new identifier sorting from rustfmt | Michael Goulet | -1/+1 | |
| 2024-09-11 | Revert warning empty patterns as unreachable | Nadrieril | -1/+5 | |
| 2024-08-10 | Stabilize `min_exhaustive_patterns` | Nadrieril | -12/+7 | |
| 2024-07-29 | Reformat `use` declarations. | Nicholas Nethercote | -7/+8 | |
| The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options. | ||||
| 2024-07-24 | Explain why a given pattern is considered unreachable | Nadrieril | -48/+145 | |
| 2024-07-20 | Expand or-patterns as a separate step | Nadrieril | -106/+74 | |
| 2024-05-02 | Stabilize exclusive_range | Ross Smyth | -1/+0 | |
| 2024-04-30 | Remove `extern crate tracing` from numerous crates. | Nicholas Nethercote | -6/+5 | |
| 2024-04-01 | Fix union handling in exhaustiveness | Nadrieril | -6/+29 | |
| 2024-03-31 | Improve debugging experience | Nadrieril | -4/+10 | |
| 2024-03-19 | Report arm intersections | Nadrieril | -4/+21 | |
| 2024-03-13 | Rename `TypeCx` -> `PatCx` | Nadrieril | -37/+37 | |
| 2024-03-13 | Rename `ValidityConstraint` -> `PlaceValidity` | Nadrieril | -18/+10 | |
| The old name came from a time where I wanted to reuse it for differentiating wildcards from bindings. I don't plan to do this anymore. | ||||
| 2024-03-11 | Store field indices in `DeconstructedPat` to avoid virtual wildcards | Nadrieril | -7/+10 | |
| 2024-03-09 | Lint small gaps between ranges | Nadrieril | -4/+42 | |
| 2024-03-09 | Make `MaybeInfiniteInt::plus_one/minus_one` fallible | Nadrieril | -1/+1 | |
| 2024-03-04 | Abort on arity mismatch | Nadrieril | -7/+15 | |
| As this can cause panics on array accesses later. | ||||
| 2024-03-03 | Add new `pattern_complexity` attribute to add possibility to limit and check ↵ | Guillaume Gomez | -1/+23 | |
| recursion in pattern matching | ||||
| 2024-02-28 | Rename `Skip` to `PrivateUninhabited` | Nadrieril | -9/+9 | |
| 2024-02-28 | Don't filter out skipped fields | Nadrieril | -5/+22 | |
| 2024-02-28 | Push the decision to skip fields further down | Nadrieril | -2/+4 | |
| 2024-02-25 | Rollup merge of #121324 - Nadrieril:unspecialize, r=cjgillot | Matthias Krüger | -15/+21 | |
| pattern_analysis: factor out unspecialization Just moving a dense bit of logic into its own method. | ||||
| 2024-02-20 | Auto merge of #120692 - Nadrieril:move-column-analysis-to-placeinfo, ↵ | bors | -74/+90 | |
| r=compiler-errors pattern_analysis: Move constructor selection logic to `PlaceInfo` This is a small refactor PR. There was a dense bit of constructor-related logic in `compute_exhaustiveness_and_usefulness`. I'm moving it out into a `PlaceInfo` method to make it easier to follow both separately. I also have plans that will complicate it further so it's good that it's somewhat encapsulated. r? `@compiler-errors` | ||||
| 2024-02-20 | Factor out unspecialization | Nadrieril | -15/+21 | |
| 2024-02-12 | Auto merge of #120324 - Nadrieril:remove-interior-mutability, r=compiler-errors | bors | -30/+61 | |
| pattern_analysis: track usefulness without interior mutability Because of or-patterns, exhaustiveness needs to be able to lint if a sub-pattern is redundant, e.g. in `Some(_) | Some(true)`. So far the only sane solution I had found was interior mutability. This is a bit of an abstraction leak, and would become a footgun if we ever reused the same `DeconstructedPat`. This PR replaces interior mutability with an address-indexed hashmap, which is logically equivalent. | ||||
| 2024-02-08 | Move constructor selection logic to `PlaceInfo` | Nadrieril | -56/+79 | |
| 2024-02-08 | Decide which constructors to report earlier. | Nadrieril | -19/+17 | |
| This gets rid of `report_individual_missing_ctors` | ||||
| 2024-02-08 | Tweak how we record missing constructors | Nadrieril | -21/+16 | |
| This is slower but also not a performance-sensitive path. | ||||
| 2024-02-07 | Prefer "0..MAX not covered" to "_ not covered" | Nadrieril | -5/+3 | |
| 2024-02-07 | Use a unique id instead of by-address indexing | Nadrieril | -34/+10 | |
| 2024-02-07 | Cleanup comments and dead code | Nadrieril | -9/+5 | |
| 2024-02-07 | Track redundant subpatterns without interior mutability | Nadrieril | -21/+55 | |
| 2024-02-07 | Move usefulness-specific pattern computations to `usefulness` | Nadrieril | -6/+31 | |
| 2024-02-07 | Rollup merge of #120633 - Nadrieril:place_info, r=compiler-errors | Guillaume Boisseau | -40/+57 | |
| pattern_analysis: gather up place-relevant info We track 3 things about each place during exhaustiveness: its type, its (data) validity, and whether it's the scrutinee place. This PR gathers all three into a single struct. r? `````@compiler-errors````` | ||||
| 2024-02-06 | Rollup merge of #120331 - Nadrieril:no-arena, r=compiler-errors | Matthias Krüger | -2/+2 | |
| pattern_analysis: use a plain `Vec` in `DeconstructedPat` The use of an arena-allocated slice in `DeconstructedPat` dates to when we needed the arena anyway for lifetime reasons. Now that we don't, I'm thinking that if `thir::Pat` can use plain old `Vec`s, maybe so can I. r? ```@ghost``` | ||||
| 2024-02-06 | Track `is_top_level` via `PlaceInfo` | Nadrieril | -10/+14 | |
| 2024-02-06 | Zip together `place_ty` and `place_validity` | Nadrieril | -33/+46 | |
| 2024-02-05 | Auto merge of #120313 - Nadrieril:graceful-error, r=compiler-errors | bors | -4/+4 | |
| pattern_analysis: Gracefully abort on type incompatibility This leaves the option for a consumer of the crate to return `Err` instead of panicking on type error. rust-analyzer could use that (e.g. https://github.com/rust-lang/rust-analyzer/issues/15808). Since the only use of `TypeCx::bug` is in `Constructor::is_covered_by`, it is tempting to return `false` instead of `Err()`, but that would cause "non-exhaustive match" false positives. r? `@compiler-errors` | ||||
| 2024-02-03 | Rollup merge of #120516 - Nadrieril:cleanup-impls, r=compiler-errors | Matthias Krüger | -12/+2 | |
| pattern_analysis: cleanup manual impls https://github.com/rust-lang/rust/pull/120420 introduced some unneeded manual impls. I remove them here. r? ```@Nilstrieb``` | ||||
| 2024-01-31 | Use a `Vec` instead of a slice in `DeconstructedPat` | Nadrieril | -2/+2 | |
| 2024-01-31 | Gracefully abort on type incompatibility | Nadrieril | -4/+4 | |
| Since the only use of `TypeCx::bug` is in `Constructor::is_covered_by`, it is tempting to return `false` instead of `Err()`, but that would cause "non-exhaustive match" false positives. | ||||
