fn specialize_err<T>(
    result: Result<T, Error>,
    from: ErrorKind,
    to: ErrorKind,
) -> Result<T, Error>Expand description
When the result is an error, transforms the ast::ErrorKind from the source Result into another one. This function is used to return clearer error messages when possible.