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:
Vincent Esche 2016-01-19 08:40:07 +01:00
parent 7a7307e5cf
commit 6100743842
2 changed files with 23 additions and 19 deletions

View file

@ -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 { .. } => ()
}
}