@@ -50,7 +50,7 @@ pub trait UnblockCallback<'tcx>: VisitProvenance {
50
50
fn timeout ( self : Box < Self > , _ecx : & mut InterpCx < ' tcx , MiriMachine < ' tcx > > )
51
51
-> InterpResult < ' tcx > ;
52
52
}
53
- type DynUnblockCallback < ' tcx > = Box < dyn UnblockCallback < ' tcx > + ' tcx > ;
53
+ pub type DynUnblockCallback < ' tcx > = Box < dyn UnblockCallback < ' tcx > + ' tcx > ;
54
54
55
55
#[ macro_export]
56
56
macro_rules! callback {
@@ -101,7 +101,7 @@ macro_rules! callback {
101
101
}
102
102
}
103
103
104
- Callback { $( $name, ) * _phantom: std:: marker:: PhantomData }
104
+ Box :: new ( Callback { $( $name, ) * _phantom: std:: marker:: PhantomData } )
105
105
} }
106
106
}
107
107
@@ -715,11 +715,11 @@ impl<'tcx> ThreadManager<'tcx> {
715
715
& mut self ,
716
716
reason : BlockReason ,
717
717
timeout : Option < Timeout > ,
718
- callback : impl UnblockCallback < ' tcx > + ' tcx ,
718
+ callback : DynUnblockCallback < ' tcx > ,
719
719
) {
720
720
let state = & mut self . threads [ self . active_thread ] . state ;
721
721
assert ! ( state. is_enabled( ) ) ;
722
- * state = ThreadState :: Blocked { reason, timeout, callback : Box :: new ( callback ) }
722
+ * state = ThreadState :: Blocked { reason, timeout, callback }
723
723
}
724
724
725
725
/// Change the active thread to some enabled thread.
@@ -1032,7 +1032,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
1032
1032
& mut self ,
1033
1033
reason : BlockReason ,
1034
1034
timeout : Option < ( TimeoutClock , TimeoutAnchor , Duration ) > ,
1035
- callback : impl UnblockCallback < ' tcx > + ' tcx ,
1035
+ callback : DynUnblockCallback < ' tcx > ,
1036
1036
) {
1037
1037
let this = self . eval_context_mut ( ) ;
1038
1038
let timeout = timeout. map ( |( clock, anchor, duration) | {
0 commit comments