Diffstat (limited to 'tests/common/walker.rs')
-rw-r--r--tests/common/walker.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/common/walker.rs b/tests/common/walker.rs
index 2c2687c..b399965 100644
--- a/tests/common/walker.rs
+++ b/tests/common/walker.rs
@@ -1,16 +1,15 @@
use effectful::{
bound::{Bool, IsSend, IsSync},
- effective::{Effective, Canonical},
- environment::{Environment},
- DynBind,
- forward_send_sync,
+ effective::{Canonical, Effective},
+ environment::Environment,
+ forward_send_sync, DynBind,
};
use mockall::mock;
use treaty::{any::AnyTrait, build::BuilderTypes, protocol::DynVisitor, Builder, Walker};
mock! {
pub Walker<Output, Error, E: Environment> {
- pub fn walk<'a, 'lt, 'ctx>(self, visitor: DynVisitor<'a, 'lt, 'ctx, E>) -> Result<Output, Error>;
+ pub fn walk<'r, 'ctx>(self, visitor: DynVisitor<'r, 'ctx, E>) -> Result<Output, Error>;
// pub fn traits(&self, id: TypeNameId) -> &Option<Box<dyn for<'ctx> AnyTrait<'ctx, E>>>;
//
@@ -20,25 +19,25 @@ mock! {
forward_send_sync!({Output, Error} {} {E: (Environment + Send)} MockWalker<Output, Error, E>);
-impl<'ctx, Output: DynBind<E>, Error: DynBind<E> + core::fmt::Debug, E: Environment + Send> Walker<'ctx, E>
- for MockWalker<Output, Error, E>
+impl<'ctx, Output: DynBind<E>, Error: DynBind<E> + core::fmt::Debug, E: Environment + Send>
+ Walker<'ctx, E> for MockWalker<Output, Error, E>
{
type Error = Error;
type Output = Output;
- fn walk<'a: 'c, 'b: 'c, 'c>(
+ fn walk<'r>(
self,
- visitor: DynVisitor<'a, 'b, 'ctx, E>,
- ) -> Canonical<'c, Result<Self::Output, Self::Error>, E>
+ visitor: DynVisitor<'r, 'ctx, E>,
+ ) -> Canonical<'r, Result<Self::Output, Self::Error>, E>
where
- Self: 'c,
+ Self: 'r,
{
E::value(self.walk(visitor)).cast()
}
}
-impl<'lt, 'ctx: 'lt, Output: DynBind<E> + 'lt, Error: DynBind<E> + 'lt, E: Environment> AnyTrait<'lt, 'ctx>
+impl<'ctx, Output: DynBind<E>, Error: DynBind<E>, E: Environment> AnyTrait<'ctx>
for MockWalker<Output, Error, E>
{
// fn upcast_to_id<'a>(