fn parse_error_to_element_error<'i>(
e: ParseError<'i>,
attr: QualName,
) -> ElementErrorExpand description
Convert a short-lived ParseError into a long-lived ElementError
We extract this as a function, instead of putting it directly in the map_err invocation
below in impl<'i, O> AttributeResultExt<O> for Result<O, ParseError<'i>>, because
putting it there as a closure generates too many duplicated copies of the code. The generic
parameter O in that impl is for the result Ok() value, not for the Err, after all.