Diffstat (limited to 'src/protocol/visitor.rs')
-rw-r--r--src/protocol/visitor.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/protocol/visitor.rs b/src/protocol/visitor.rs
index 35f24ea..aac873f 100644
--- a/src/protocol/visitor.rs
+++ b/src/protocol/visitor.rs
@@ -82,16 +82,19 @@ impl<S> VisitResult<S> {
}
pub trait EffectiveVisitExt<'lt>: Effective<'lt> {
- fn if_skipped<'ctx: 'lt, 'wrap, Ctx: Ss, F: Ss>(
+ fn if_skipped<'ctx, 'wrap, Ctx, F>(
self,
f: F,
) -> ErasedEffective<'wrap, (Ctx, VisitResult<()>), Self::Effect>
where
Self: Effective<'lt, Output = (Ctx, VisitResult<()>)>,
- F: for<'temp> FnOnce(
- &'temp mut Ctx,
- )
- -> ErasedEffective<'temp, VisitResult<()>, Self::Effect, &'ctx ()>,
+ F: Ss
+ + for<'temp> FnOnce(
+ &'temp mut Ctx,
+ )
+ -> ErasedEffective<'temp, VisitResult<()>, Self::Effect, &'ctx ()>,
+ Ctx: Ss,
+ 'ctx: 'lt,
'lt: 'wrap,
{
self.r#do(
@@ -112,7 +115,7 @@ pub trait EffectiveVisitExt<'lt>: Effective<'lt> {
)
}
- fn if_not_finished<'ctx: 'lt, 'wrap, Ctx: Ss, F: Ss>(
+ fn if_not_finished<'ctx, 'wrap, Ctx, F>(
self,
f: F,
) -> ErasedEffective<'wrap, (Ctx, VisitResult<()>), Self::Effect>
@@ -122,6 +125,9 @@ pub trait EffectiveVisitExt<'lt>: Effective<'lt> {
&'temp mut Ctx,
)
-> ErasedEffective<'temp, VisitResult<()>, Self::Effect, &'ctx ()>,
+ 'ctx: 'lt,
+ Ctx: Ss,
+ F: Ss,
'lt: 'wrap,
{
self.r#do(