about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/tests/exhaustiveness.rs
AgeCommit message (Collapse)AuthorLines
2025-07-28In rustc_pattern_analysis, put `true` witnesses before `false` witnessesChayim Refael Friedman-0/+3
In rustc it doesn't really matter what the order of the witnesses is, but I'm planning to use the witnesses for implementing the "add missing match arms" assist in rust-analyzer, and there `true` before `false` is the natural order (like `Some` before `None`), and also what the current assist does. The current order doesn't seem to be intentional; the code was created when bool ctors became their own thing, not just int ctors, but for integer, 0 before 1 is indeed the natural order.
2025-07-20List all the variants of non-exhaustive enums in exhaustive modeNadrieril-2/+20
2025-07-20pattern_analysis: add option to get a full set of witnessesNadrieril-5/+87
2025-03-20Use `-Wunused_crate_dependencies` for compiler crates.Nicholas Nethercote-0/+2
It's very useful. There are some false positives involving integration tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a false positive involving `rustc_driver_impl`'s `rustc_randomized_layouts` feature. And I removed a `rustc_span` mention in a doc comment in `rustc_log` because it wasn't integral to the comment but caused a dev-dependency.
2025-02-17Add `pattern_complexity_limit` to `Limits`.Nicholas Nethercote-1/+2
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`.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-02chore: Fix typos in 'compiler' (batch 2)Alexander Cyon-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-24Add some testsNadrieril-0/+14
2024-06-20Add blank lines after module-level `//!` comments.Nicholas Nethercote-0/+1
Most modules have such a blank line, but some don't. Inserting the blank line makes it clearer that the `//!` comments are describing the entire module, rather than the `use` declaration(s) that immediately follows.
2024-03-19Add a crate-custom test harnessNadrieril-0/+77