mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Improve error message for uninhabited patterns
This commit is contained in:
parent
147636f42b
commit
0f0e414272
4 changed files with 64 additions and 40 deletions
|
@ -92,14 +92,12 @@ pub enum Error {
|
|||
overall_region: Region,
|
||||
branch_region: Region,
|
||||
index: HumanIndex,
|
||||
reason: RedundantReason,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RedundantReason {
|
||||
PreviouslyCovered,
|
||||
Uninhabited,
|
||||
Unmatchable {
|
||||
overall_region: Region,
|
||||
branch_region: Region,
|
||||
index: HumanIndex,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue