| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-01-11 | Move /src/test to /tests | Albert Larsan | -23/+0 | |
| 2022-09-03 | Include enum path in variant suggestion | Michael Goulet | -3/+3 | |
| 2022-03-08 | Change wording of suggestion to add missing `match` arm | Esteban Kuber | -1/+1 | |
| 2022-03-08 | Point at uncovered variants in enum definition in `note` instead of a ↵ | Esteban Kuber | -9/+9 | |
| `span_label` This makes the order of the output always consistent: 1. Place of the `match` missing arms 2. The `enum` definition span 3. The structured suggestion to add a fallthrough arm | ||||
| 2022-03-08 | When finding a match expr with a single arm that requires more, suggest it | Esteban Kuber | -1/+5 | |
| Given ```rust match Some(42) { Some(0) => {} } ``` suggest ```rust match Some(42) { Some(0) => {} None | Some(_) => todo!(), } ``` | ||||
| 2022-03-08 | When encountering a match expr with no arms, suggest it | Esteban Kuber | -1/+1 | |
| Given ```rust match Some(42) {} ``` suggest ```rust match Some(42) { None | Some(_) => todo!(), } ``` | ||||
| 2020-03-27 | non-exhastive diagnostic: add note re. scrutinee type | Mazdak Farrokhzad | -0/+1 | |
| 2019-03-11 | Update tests | Vadim Petrochenkov | -1/+1 | |
| 2019-03-02 | Point at enum definition when match patterns are not exhaustive | Esteban Küber | -2/+11 | |
| ``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518. | ||||
| 2018-12-25 | Remove licenses | Mark Rousskov | -1/+1 | |
| 2018-03-14 | update tests | Guillaume Gomez | -1/+1 | |
| 2018-02-26 | Update UI tests | Vadim Petrochenkov | -1/+1 | |
| 2018-02-25 | Update ui tests | Guillaume Gomez | -0/+1 | |
| 2018-02-08 | Move some E0XXX to `ui` | Esteban Küber | -0/+8 | |
