Give global options their own lifetime.

This commit is contained in:
Tom Alexander
2023-09-03 15:44:18 -04:00
parent a7b9eb9db4
commit df79cbd0b7
48 changed files with 470 additions and 466 deletions

View File

@@ -25,8 +25,8 @@ use crate::parser::util::start_of_line;
use crate::types::LatexEnvironment;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn latex_environment<'r, 's>(
context: RefContext<'_, 'r, 's>,
pub fn latex_environment<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, LatexEnvironment<'s>> {
start_of_line(input)?;
@@ -71,9 +71,9 @@ fn contents<F: ContextMatcher>(end_matcher: F) -> impl ContextMatcher {
feature = "tracing",
tracing::instrument(ret, level = "debug", skip(end_matcher))
)]
fn _contents<'b, 'r, 's, F: ContextMatcher>(
fn _contents<'b, 'g, 'r, 's, F: ContextMatcher>(
end_matcher: F,
context: RefContext<'b, 'r, 's>,
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, source) = recognize(many_till(
@@ -95,10 +95,10 @@ fn latex_environment_end(current_name: &str) -> impl ContextMatcher {
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn _latex_environment_end<'r, 's, 'x>(
_context: RefContext<'_, 'r, 's>,
fn _latex_environment_end<'b, 'g, 'r, 's, 'c>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
current_name_lower: &'x str,
current_name_lower: &'c str,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
start_of_line(input)?;
let (remaining, _leading_whitespace) = space0(input)?;