Diffstat (limited to 'tests/protocol_walker_hint.rs')
-rw-r--r--tests/protocol_walker_hint.rs28
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/protocol_walker_hint.rs b/tests/protocol_walker_hint.rs
index 4928752..a09b1f3 100644
--- a/tests/protocol_walker_hint.rs
+++ b/tests/protocol_walker_hint.rs
@@ -9,7 +9,7 @@ use treaty::{
},
hkt::higher_ranked_type,
protocol::{
- walker::hint::{self, Hint, HintMeta, HintProto, Meta, MetaKnown},
+ walker::hint::{self, Hint, HintMeta, HintProto, Meta, MetaHint, MetaKnown},
DynVisitor,
},
Flow,
@@ -108,11 +108,14 @@ fn known_can_have_temp_mutable_borrow() {
struct Walker<'ctx>(&'ctx mut String);
impl<'ctx> Hint<'ctx, MyProtocol> for Walker<'ctx> {
- fn hint<'a>(
- &'a mut self,
- _visitor: DynVisitor<'a, 'ctx>,
- _hint: <MyProtocol as HintMeta>::Hint,
- ) -> ErasedEffective<'a, Flow, Blocking> {
+ fn hint<'this, 'visitor, 'hint, 'e>(
+ &'this mut self,
+ visitor: DynVisitor<'visitor, 'ctx>,
+ hint: MetaHint<'hint, 'ctx, MyProtocol>,
+ ) -> ErasedEffective<'e, Flow, Blocking>
+ where
+ 'ctx: 'this + 'visitor + 'hint + 'e,
+ {
unreachable!()
}
@@ -167,11 +170,14 @@ fn known_can_have_context_borrow() {
struct Walker<'ctx>(&'ctx String);
impl<'ctx> Hint<'ctx, MyProtocol> for Walker<'ctx> {
- fn hint<'a>(
- &'a mut self,
- _visitor: DynVisitor<'a, 'ctx>,
- _hint: <MyProtocol as HintMeta>::Hint,
- ) -> ErasedEffective<'a, Flow, Blocking> {
+ fn hint<'this, 'visitor, 'hint, 'e>(
+ &'this mut self,
+ visitor: DynVisitor<'visitor, 'ctx>,
+ hint: MetaHint<'hint, 'ctx, MyProtocol>,
+ ) -> ErasedEffective<'e, Flow, Blocking>
+ where
+ 'ctx: 'this + 'visitor + 'hint + 'e,
+ {
unreachable!()
}