@@ -50,7 +50,7 @@ pub trait UnblockCallback<'tcx>: VisitProvenance {
5050 fn timeout ( self : Box < Self > , _ecx : & mut InterpCx < ' tcx , MiriMachine < ' tcx > > )
5151 -> InterpResult < ' tcx > ;
5252}
53- type DynUnblockCallback < ' tcx > = Box < dyn UnblockCallback < ' tcx > + ' tcx > ;
53+ pub type DynUnblockCallback < ' tcx > = Box < dyn UnblockCallback < ' tcx > + ' tcx > ;
5454
5555#[ macro_export]
5656macro_rules! callback {
@@ -101,7 +101,7 @@ macro_rules! callback {
101101 }
102102 }
103103
104- Callback { $( $name, ) * _phantom: std:: marker:: PhantomData }
104+ Box :: new ( Callback { $( $name, ) * _phantom: std:: marker:: PhantomData } )
105105 } }
106106}
107107
@@ -715,11 +715,11 @@ impl<'tcx> ThreadManager<'tcx> {
715715 & mut self ,
716716 reason : BlockReason ,
717717 timeout : Option < Timeout > ,
718- callback : impl UnblockCallback < ' tcx > + ' tcx ,
718+ callback : DynUnblockCallback < ' tcx > ,
719719 ) {
720720 let state = & mut self . threads [ self . active_thread ] . state ;
721721 assert ! ( state. is_enabled( ) ) ;
722- * state = ThreadState :: Blocked { reason, timeout, callback : Box :: new ( callback ) }
722+ * state = ThreadState :: Blocked { reason, timeout, callback }
723723 }
724724
725725 /// Change the active thread to some enabled thread.
@@ -1032,7 +1032,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
10321032 & mut self ,
10331033 reason : BlockReason ,
10341034 timeout : Option < ( TimeoutClock , TimeoutAnchor , Duration ) > ,
1035- callback : impl UnblockCallback < ' tcx > + ' tcx ,
1035+ callback : DynUnblockCallback < ' tcx > ,
10361036 ) {
10371037 let this = self . eval_context_mut ( ) ;
10381038 let timeout = timeout. map ( |( clock, anchor, duration) | {
0 commit comments