Skip to content

Commit 83e9225

Browse files
authored
Merge pull request #501 from ratmice/non_exhaustive_error_kinds
Make `YaccGrammarErrorKind` and `LexErrorKind` `non_exhaustive`.
2 parents 68f7d47 + 3b55ef3 commit 83e9225

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use super::{
2323

2424
/// The various different possible Yacc parser errors.
2525
#[derive(Debug, PartialEq, Eq, Clone)]
26+
#[non_exhaustive]
2627
pub enum YaccGrammarErrorKind {
2728
IllegalInteger,
2829
IllegalName,

lrlex/src/lib/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl Error for LexBuildError {}
4747

4848
/// The various different possible Lex parser errors.
4949
#[derive(Debug, PartialEq, Eq, Clone)]
50+
#[non_exhaustive]
5051
pub enum LexErrorKind {
5152
PrematureEnd,
5253
RoutinesNotSupported,

0 commit comments

Comments
 (0)