Give global options their own lifetime.
This commit is contained in:
@@ -7,9 +7,11 @@ mod list;
|
||||
mod parser_context;
|
||||
mod parser_with_context;
|
||||
|
||||
pub type RefContext<'b, 'r, 's> = &'b Context<'r, 's>;
|
||||
pub trait ContextMatcher =
|
||||
for<'b, 'r, 's> Fn(RefContext<'b, 'r, 's>, OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
||||
pub type RefContext<'b, 'g, 'r, 's> = &'b Context<'g, 'r, 's>;
|
||||
pub trait ContextMatcher = for<'b, 'g, 'r, 's> Fn(
|
||||
RefContext<'b, 'g, 'r, 's>,
|
||||
OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
||||
pub type DynContextMatcher<'c> = dyn ContextMatcher + 'c;
|
||||
pub trait Matcher = for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>>;
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user