Improve error message for non-exhaustive patterns
Changes error message from displaying first found missing constructor witness to showing up to 10, if necessary. Fixes issue #16884.
This commit is contained in:
parent
7a7307e5cf
commit
6100743842
2 changed files with 23 additions and 19 deletions
|
|
@ -34,7 +34,7 @@ fn struct_with_a_nested_enum_and_vector() {
|
|||
|
||||
fn enum_with_multiple_missing_variants() {
|
||||
match Color::Red {
|
||||
//~^ ERROR non-exhaustive patterns: `Red` not covered
|
||||
//~^ ERROR non-exhaustive patterns: `Red`, `Green` not covered
|
||||
Color::CustomRGBA { .. } => ()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue