Remove unused State::fail method

This commit is contained in:
Joshua Warner 2022-01-03 20:06:31 -08:00
parent 352c7979eb
commit d9cfa2b2a5

View File

@ -1,5 +1,3 @@
use crate::parser::Progress;
use bumpalo::Bump;
use roc_region::all::{Position, Region};
use std::fmt;
@ -77,16 +75,6 @@ impl<'a> State<'a> {
pub fn len_region(&self, length: u32) -> Region {
Region::new(self.pos(), self.pos().bump_column(length))
}
/// Return a failing ParseResult for the given FailReason
pub fn fail<T, X>(
self,
_arena: &'a Bump,
progress: Progress,
reason: X,
) -> Result<(Progress, T, Self), (Progress, X, Self)> {
Err((progress, reason, self))
}
}
impl<'a> fmt::Debug for State<'a> {