Move inclusive range check to validation

This commit is contained in:
Geoffry Song 2019-11-15 01:04:37 -08:00
parent 989cebc99c
commit a68aefdc46
5 changed files with 33 additions and 11 deletions

View file

@ -83,6 +83,7 @@ pub enum SyntaxErrorKind {
InvalidMatchInnerAttr,
InvalidTupleIndexFormat,
VisibilityNotAllowed,
InclusiveRangeMissingEnd,
}
impl fmt::Display for SyntaxErrorKind {
@ -103,6 +104,9 @@ impl fmt::Display for SyntaxErrorKind {
VisibilityNotAllowed => {
write!(f, "unnecessary visibility qualifier")
}
InclusiveRangeMissingEnd => {
write!(f, "An inclusive range must have an end expression")
}
}
}
}