about summary refs log tree commit diff
path: root/src/test/ui/rfc-2005-default-binding-mode/slice.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-16/+0
2022-03-08Change wording of suggestion to add missing `match` armEsteban Kuber-1/+1
2022-03-08When finding a match expr with a single arm that requires more, suggest itEsteban Kuber-1/+5
Given ```rust match Some(42) { Some(0) => {} } ``` suggest ```rust match Some(42) { Some(0) => {} None | Some(_) => todo!(), } ```
2022-03-08When encountering a match expr with no arms, suggest itEsteban Kuber-1/+1
Given ```rust match Some(42) {} ``` suggest ```rust match Some(42) { None | Some(_) => todo!(), } ```
2020-03-27non-exhastive diagnostic: add note re. scrutinee typeMazdak Farrokhzad-0/+1
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-1/+1
2019-03-11Update testsVadim Petrochenkov-1/+1
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban 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-25Remove licensesMark Rousskov-1/+1
2018-03-28Stabilize match_default_bindingsTaylor Cramer-1/+1
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-14update testsGuillaume Gomez-1/+1
2018-02-26Update UI testsVadim Petrochenkov-1/+1
2018-02-25Update ui testsGuillaume Gomez-0/+1
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-1/+1
2017-10-06implement pattern-binding-modes RFCTobias 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