Diffstat (limited to 'src/protocol/visitor/request_hint.rs')
| -rw-r--r-- | src/protocol/visitor/request_hint.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/protocol/visitor/request_hint.rs b/src/protocol/visitor/request_hint.rs index bf0ba98..d79ef73 100644 --- a/src/protocol/visitor/request_hint.rs +++ b/src/protocol/visitor/request_hint.rs @@ -1,21 +1,23 @@ +use core::ops::ControlFlow; + use crate::{ nameable, - protocol::{ControlFlowFor, Effect, SyncEffect, Walker}, + protocol::{Yield, Effect, SyncEffect, Walker}, }; /// Protocol for requesting a hint from a visitor. -pub trait RequestHint<'a, 'ctx: 'a, E: Effect<'ctx> = SyncEffect> { +pub trait RequestHint<'a, 'ctx: 'a, E: Effect<'ctx, ControlFlow<(), ()>>> { /// Call this to request a hint. /// /// `walker` is what the visitor (`self`) will call to give a hint using the /// [`Hint`][crate::builtins::walker::Hint] protocol. - fn request_hint(&'a mut self, walker: Walker<'a, 'ctx, E>) -> ControlFlowFor<'a, 'ctx, E>; + fn request_hint(&'a mut self, walker: Walker<'a, 'ctx, E>) -> Yield<'a, 'ctx, ControlFlow<(), ()>, E>; } nameable! { pub struct Name['a, 'ctx, E]; impl [E] for dyn RequestHint<'a, 'ctx, E> + 'a where { - E: Effect<'ctx>, + E: Effect<'ctx, ControlFlow<(), ()>>, 'ctx: 'a } } |