@@ -549,7 +549,7 @@ fn with_local_instance<R>(fun: impl FnOnce(&mut dyn VMStore, Instance) -> R) ->
549549///
550550/// The store and instance may be retrieved by (transitive) child calls using
551551/// `with_local_instance`.
552- fn poll_with_local_instance < F : Future + Send + ?Sized > (
552+ fn poll_with_local_instance < F : Future + ?Sized > (
553553 store : & mut dyn VMStore ,
554554 instance : Instance ,
555555 future : & mut Pin < & mut F > ,
@@ -1372,14 +1372,9 @@ impl Instance {
13721372 /// the future presumably does not depend on any guest task making further
13731373 /// progress (since no futher progress can be made) and thus is not an
13741374 /// appropriate future to poll using this function.
1375- pub async fn run < F > (
1376- & self ,
1377- mut store : impl AsContextMut < Data : Send > ,
1378- fut : F ,
1379- ) -> Result < F :: Output >
1375+ pub async fn run < F > ( & self , mut store : impl AsContextMut , fut : F ) -> Result < F :: Output >
13801376 where
1381- F : Future + Send ,
1382- F :: Output : Send + Sync + ' static ,
1377+ F : Future ,
13831378 {
13841379 check_recursive_run ( ) ;
13851380 self . poll_until ( store. as_context_mut ( ) , fut) . await
@@ -1471,7 +1466,7 @@ impl Instance {
14711466 /// # Ok(())
14721467 /// # }
14731468 /// ```
1474- pub async fn run_with < U : Send + ' static , V : Send + Sync + ' static , F > (
1469+ pub async fn run_with < U , V , F > (
14751470 & self ,
14761471 mut store : impl AsContextMut < Data = U > ,
14771472 fun : F ,
@@ -1487,7 +1482,7 @@ impl Instance {
14871482 self . run ( store, future) . await
14881483 }
14891484
1490- fn run_with_raw < U : Send + ' static , V : Send + Sync + ' static , F > (
1485+ fn run_with_raw < U , V , F > (
14911486 self ,
14921487 mut store : impl AsContextMut < Data = U > ,
14931488 fun : F ,
@@ -1582,10 +1577,10 @@ impl Instance {
15821577 /// The returned future will resolve when either the specified future
15831578 /// completes (in which case we return its result) or no further progress
15841579 /// can be made (in which case we trap with `Trap::AsyncDeadlock`).
1585- async fn poll_until < T , R : Send + Sync + ' static > (
1580+ async fn poll_until < T , R > (
15861581 self ,
15871582 mut store : StoreContextMut < ' _ , T > ,
1588- future : impl Future < Output = R > + Send ,
1583+ future : impl Future < Output = R > ,
15891584 ) -> Result < R > {
15901585 let mut future = pin ! ( future) ;
15911586
0 commit comments