Skip to content

Commit d2bb76e

Browse files
committed
automata: make the PikeVM optional in the meta engine
1 parent 2b52759 commit d2bb76e

5 files changed

Lines changed: 823 additions & 180 deletions

File tree

regex-automata/src/meta/error.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ impl RetryFailError {
205205
pub(crate) fn from_offset(offset: usize) -> RetryFailError {
206206
RetryFailError { offset }
207207
}
208+
209+
pub(crate) fn offset(&self) -> usize {
210+
self.offset
211+
}
208212
}
209213

210214
#[cfg(feature = "std")]
@@ -233,7 +237,9 @@ impl From<MatchError> for RetryFailError {
233237
// or with higher level control flow logic. For example, the
234238
// backtracker's wrapper will never hand out a backtracker engine
235239
// when the haystack would be too long.
236-
HaystackTooLong { .. } | UnsupportedAnchored { .. } => {
240+
HaystackTooLong { .. }
241+
| UnsupportedAnchored { .. }
242+
| NoEngine { .. } => {
237243
unreachable!("found impossible error in meta engine: {merr}")
238244
}
239245
}

0 commit comments

Comments
 (0)