Diffstat (limited to 'tests/common/builder.rs')
| -rw-r--r-- | tests/common/builder.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/common/builder.rs b/tests/common/builder.rs index 419661b..258940f 100644 --- a/tests/common/builder.rs +++ b/tests/common/builder.rs @@ -79,8 +79,8 @@ impl<Seed: 'static, Value: 'static, Error: 'static, E: Environment> } } -impl<'ctx, Seed: DynBind<E>, Value: Send, Error: DynBind<E> + Display + Debug, E: Environment + Send> - Builder<'ctx, E> for MockBuilder<Seed, Value, Error, E> +impl<'lt, 'ctx, Seed: DynBind<E>, Value: Send, Error: DynBind<E> + Display + Debug, E: Environment + Send> + Builder<'lt, 'ctx, E> for MockBuilder<Seed, Value, Error, E> where Dynamic<Value>: DynBind<E>, { @@ -99,44 +99,41 @@ where } } -impl<'ctx, Seed, Value: Send, Error: Display + Debug, E: Environment + Send> AsVisitor<'ctx, E> +impl<'lt, 'ctx, Seed, Value: Send, Error: Display + Debug, E: Environment + Send> AsVisitor<'lt, 'ctx, E> for MockBuilder<Seed, Value, Error, E> where Seed: DynBind<E>, Error: DynBind<E>, Dynamic<Value>: DynBind<E>, { - fn as_visitor<'a>(&'a mut self) -> DynVisitor<'a, 'ctx, E> - where - 'ctx: 'a, - { + fn as_visitor(&mut self) -> DynVisitor<'_, 'lt, 'ctx, E> { DynVisitor(self) } } -impl<'ctx, Seed, Value, Error, E: Environment> AnyTrait<'ctx> for MockBuilder<Seed, Value, Error, E> +impl<'lt, 'ctx: 'lt, Seed, Value, Error, E: Environment> AnyTrait<'lt, 'ctx> for MockBuilder<Seed, Value, Error, E> where Seed: DynBind<E>, Error: DynBind<E>, Dynamic<Value>: DynBind<E>, { - fn upcast_by_id<'a, 'lt: 'a>( + fn upcast_by_id<'a>( &'a self, id: treaty::any::WithLtTypeId<'lt, 'ctx>, ) -> Option<treaty::any::RefAnyUnsized<'a, 'lt, 'ctx>> where - 'ctx: 'lt, + 'lt: 'a, { let _id = id; None } - fn upcast_by_id_mut<'a, 'lt: 'a>( + fn upcast_by_id_mut<'a>( &'a mut self, id: treaty::any::WithLtTypeId<'lt, 'ctx>, ) -> Option<treaty::any::MutAnyUnsized<'a, 'lt, 'ctx>> where - 'ctx: 'lt, + 'lt: 'a, { self.traits_mut()(id) } |