1 2 3 4 5 6 7 8 9 10 11 12 13 14
use super::*; #[inline] pub fn with_loc<T, I, F, E>(expr: &I, f: F) -> PQLResult<T> where I: Spanned, F: FnOnce() -> Result<T, E>, PQLErrorKind: From<E>, { f().map_err(|err| PQLError { loc: expr.loc(), kind: err.into(), }) }