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

@@ -18,8 +18,8 @@ use crate::types::Object;
use crate::types::PlainText;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub fn plain_text<'r, 's>(
context: RefContext<'_, 'r, 's>,
pub fn plain_text<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, PlainText<'s>> {
let (remaining, source) = recognize(verify(
@@ -42,8 +42,8 @@ pub fn plain_text<'r, 's>(
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn plain_text_end<'r, 's>(
context: RefContext<'_, 'r, 's>,
fn plain_text_end<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
recognize(parser_with_context!(any_object_except_plain_text)(context))(input)
@@ -51,9 +51,9 @@ fn plain_text_end<'r, 's>(
impl<'x> RematchObject<'x> for PlainText<'x> {
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn rematch_object<'r, 's>(
fn rematch_object<'b, 'g, 'r, 's>(
&'x self,
_context: RefContext<'_, 'r, 's>,
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Object<'s>> {
map(tag(self.source), |s| {