| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-01-11 | Move /src/test to /tests | Albert Larsan | -16/+0 | |
| 2022-03-08 | Change wording of suggestion to add missing `match` arm | Esteban Kuber | -1/+1 | |
| 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 | |
| 2020-01-18 | slice_patterns: remove gates in tests | Mazdak Farrokhzad | -1/+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 | -0/+2 | |
| ``` 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-28 | Stabilize match_default_bindings | Taylor Cramer | -1/+1 | |
| This includes a submodule update to rustfmt in order to allow a stable feature declaration. | ||||
| 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 | |
| 2017-11-24 | Merge cfail and ui tests into ui tests | Oliver Schneider | -1/+1 | |
| 2017-10-06 | implement pattern-binding-modes RFC | Tobias Schottdorf | -0/+8 | |
| See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md | ||||
