| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-03-07 | Account for `if (let pat = expr) {}` | Esteban Küber | -2/+1 | |
| Partially address #82827. | ||||
| 2021-02-23 | Rollup merge of #82308 - estebank:issue-82290, r=lcnr | Dylan DPC | -0/+27 | |
| Lower condition of `if` expression before it's "then" block Fix #82290, fix #82250. | ||||
| 2021-02-19 | Lower condition of `if` expression before it's "then" block | Esteban Küber | -0/+27 | |
| Fix #82290, fix #82250. | ||||
| 2021-02-18 | Add explanations and suggestions to `irrefutable_let_patterns` lint | Camelid | -4/+26 | |
| 2021-02-17 | replace if-let and while-let with `if let` and `while let` | Takayuki Maeda | -4/+4 | |
| 2021-02-13 | Add match pattern diagnostics regression test | Bram van den Heuvel | -0/+29 | |
| 2021-02-07 | Auto merge of #80632 - Nadrieril:fix-80501, r=varkor | bors | -0/+27 | |
| Identify unreachable subpatterns more reliably In https://github.com/rust-lang/rust/pull/80104 I used `Span`s to identify unreachable sub-patterns in the presence of or-patterns during exhaustiveness checking. In https://github.com/rust-lang/rust/issues/80501 it was revealed that `Span`s are complicated and that this was not a good idea. Instead, this PR identifies subpatterns logically: as a path in the tree of subpatterns of a given pattern. I made a struct that captures a set of such subpatterns. This is a bit complex, but thankfully self-contained; the rest of the code does not need to know anything about it. Fixes https://github.com/rust-lang/rust/issues/80501. I think I managed to keep the perf neutral. r? `@varkor` | ||||
| 2021-02-06 | path trimming: ignore type aliases | Dan Aloni | -13/+13 | |
| 2021-02-03 | move test to be with the others | mark | -44/+0 | |
| 2021-01-26 | Account for existing `_` field pattern when suggesting `..` | Esteban Küber | -2/+2 | |
| Follow up to #80017. | ||||
| 2021-01-24 | Identify subpatterns by the path to them instead of spans | Nadrieril | -21/+3 | |
| 2021-01-24 | Add tests | Nadrieril | -0/+45 | |
| 2021-01-16 | Move some tests to more reasonable directories - 2 | Caio | -0/+244 | |
| Address comments Update limits | ||||
| 2021-01-12 | Include `..` suggestion if fields are all wildcards | Camelid | -6/+16 | |
| 2021-01-12 | Always show suggestions in their own subwindows | Camelid | -20/+30 | |
| 2021-01-12 | Add a test case with lots of whitespace | Camelid | -8/+34 | |
| 2021-01-12 | Only suggest `..` if more than one field is missing | Camelid | -60/+26 | |
| 2021-01-12 | Specialize `..` help message for all fields vs. the rest | Camelid | -13/+13 | |
| 2021-01-12 | Suggest `Variant(..)` if all of the mentioned fields are `_` | Camelid | -4/+4 | |
| 2021-01-12 | Suggest `_` and `..` if a pattern has too few fields | Camelid | -0/+179 | |
| For example, this code: struct S(i32, f32); let S(x) = S(0, 1.0); will make the compiler suggest either: let S(x, _) = S(0, 1.0); or: let S(x, ..) = S(0, 1.0); | ||||
| 2021-01-12 | Add tests for uninhabited types | Nadrieril | -212/+351 | |
| 2021-01-12 | Deduplicate some tests using revisions | Nadrieril | -227/+74 | |
| 2021-01-03 | Add notes to stderr of non-exhaustive-reference test | Daniel Noom | -2/+6 | |
| 2021-01-03 | Add note to non-exhaustive match on reference to empty | Daniel Noom | -0/+24 | |
| Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123 | ||||
| 2020-12-22 | Add some tests | Nadrieril | -28/+71 | |
| 2020-12-22 | Auto merge of #78242 - Nadrieril:rename-overlapping_endpoints-lint, r=varkor | bors | -86/+103 | |
| Rename `overlapping_patterns` lint As discussed in https://github.com/rust-lang/rust/issues/65477. I also tweaked a few things along the way. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking | ||||
| 2020-12-20 | Fix pretty printing an AST representing `&(mut ident)` | Thomas Bahn | -0/+19 | |
| `PatKind::Ref(PatKind::Ident(BindingMode::ByValue(Mutability::Mut), ..), ..)` is an AST representing `&(mut ident)`. It was errorneously printed as `&mut ident` which reparsed into a syntactically different AST. This affected help diagnostics in the parser. | ||||
| 2020-12-20 | Auto merge of #80100 - mark-i-m:pattORns-2, r=petrochenkov | bors | -0/+44 | |
| or_patterns: implement :pat edition-specific behavior cc #54883 `@joshtriplett` This PR implements the edition-specific behavior of `:pat` wrt or-patterns, as determined by the crater runs and T-lang consensus in https://github.com/rust-lang/rust/issues/54883#issuecomment-745509090. I believe this can unblock stabilization of or_patterns. r? `@petrochenkov` | ||||
| 2020-12-19 | Tweak diagnostics | Nadrieril | -8/+8 | |
| 2020-12-19 | implement edition-specific :pat behavior for 2015/18 | mark | -0/+44 | |
| 2020-12-18 | Keep all witnesses of non-exhaustiveness | Nadrieril | -12/+14 | |
| 2020-12-18 | Add tests | Nadrieril | -14/+47 | |
| 2020-11-29 | `overlapping_range_endpoints` does not belong in the `unused` lint group | Nadrieril | -37/+39 | |
| 2020-11-29 | Improve error message | Nadrieril | -17/+32 | |
| 2020-11-29 | Be consistent about linting singletons | Nadrieril | -19/+3 | |
| 2020-11-29 | Rename the `overlapping_patterns` lint to `overlapping_range_endpoints` | Nadrieril | -33/+33 | |
| 2020-11-29 | Add tests | Nadrieril | -3/+19 | |
| 2020-11-28 | Correctly detect `usize`/`isize` range overlaps | Nadrieril | -2/+8 | |
| 2020-11-21 | Improve integer range tests | Nadrieril | -655/+892 | |
| 2020-11-19 | Regroup many usefulness-related test in the same folder | Nadrieril | -0/+686 | |
| 2020-11-18 | Auto merge of #78995 - Nadrieril:clean-empty-match, r=varkor | bors | -55/+162 | |
| Handle empty matches cleanly in exhaustiveness checking This removes the special-casing of empty matches that was done in `check_match`. This fixes most of https://github.com/rust-lang/rust/issues/55123. Somewhat unrelatedly, I also made `_match.rs` more self-contained, because I think it's cleaner. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking | ||||
| 2020-11-17 | Fix exhaustiveness in case a byte string literal is used at slice type | oli | -2/+2 | |
| 2020-11-16 | Add a test for foreign empty enums | Nadrieril | -48/+102 | |
| 2020-11-12 | Handle empty matches cleanly | Nadrieril | -36/+43 | |
| 2020-11-12 | Add tests | Nadrieril | -42/+88 | |
| 2020-11-05 | Auto merge of #78638 - vn-ki:bindigs-after-at-issue-69971, r=oli-obk | bors | -595/+524 | |
| reverse binding order in matches to allow the subbinding of copyable fields in bindings after @ Fixes #69971 ### TODO - [x] Regression tests r? `@oli-obk` | ||||
| 2020-11-03 | review comments | Vishnunarayan K I | -1/+4 | |
| 2020-11-03 | add tests | Vishnunarayan K I | -0/+49 | |
| 2020-11-03 | preserve bindings order for Some | Vishnunarayan K I | -201/+159 | |
| 2020-11-02 | new fix method and update tests | Vishnunarayan K I | -57/+57 | |
