diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-13 20:35:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-13 20:35:28 +0100 |
| commit | df9e491fb238ff7b7bfee8dd2d3f01158ac8b0d3 (patch) | |
| tree | 40e01a66c07aed56b80b80b010e18bd84d73deaf /src/test/ui/error-codes | |
| parent | 3964a55ba59bb6c3d4badcbddc49f6929ef76862 (diff) | |
| parent | fbd2cd09e6fd044cad02af97e581853f1875ab2a (diff) | |
| download | rust-df9e491fb238ff7b7bfee8dd2d3f01158ac8b0d3.tar.gz rust-df9e491fb238ff7b7bfee8dd2d3f01158ac8b0d3.zip | |
Rollup merge of #67026 - Nadrieril:improve-usefulness-empty, r=varkor,Centril,estebank
Improve diagnostics and code for exhaustiveness of empty matches There was a completely separate check and diagnostics for the case of an empty match. This led to slightly different error messages and duplicated code. This improves code reuse and generally clarifies what happens for empty matches. This also clarifies the action of the `exhaustive_patterns` feature, and ensures that this feature doesn't change diagnostics in places it doesn't need to.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0004-2.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index db0a2b5a085..f5b41cd1cc0 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -1,8 +1,8 @@ -error[E0004]: non-exhaustive patterns: multiple patterns of type `std::option::Option<i32>` are not handled +error[E0004]: non-exhaustive patterns: `None` and `Some(_)` not covered --> $DIR/E0004-2.rs:4:11 | LL | match x { } - | ^ + | ^ patterns `None` and `Some(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms |
