@@ -605,14 +605,14 @@ impl<T> HostFuture<T> {
605605 }
606606
607607 /// Convert this object into a [`FutureReader`].
608- pub fn into_reader < U : ' static , S : AsContextMut < Data = U > > ( self , mut store : S ) -> FutureReader < T >
608+ pub fn into_reader ( self , mut store : impl AsContextMut ) -> FutureReader < T >
609609 where
610610 T : func:: Lower + func:: Lift + Send + Sync + ' static ,
611611 {
612612 FutureReader {
613613 instance : self . instance ,
614614 rep : self . rep ,
615- tx : Some ( self . instance . start_read_event_loop :: < _ , _ , U > (
615+ tx : Some ( self . instance . start_read_event_loop (
616616 store. as_context_mut ( ) ,
617617 self . rep ,
618618 TransmitKind :: Future ,
@@ -984,18 +984,15 @@ impl<T> HostStream<T> {
984984 }
985985
986986 /// Convert this object into a [`StreamReader`].
987- pub fn into_reader < B , U : ' static , S : AsContextMut < Data = U > > (
988- self ,
989- mut store : S ,
990- ) -> StreamReader < B >
987+ pub fn into_reader < B > ( self , mut store : impl AsContextMut ) -> StreamReader < B >
991988 where
992989 T : func:: Lower + func:: Lift + Send + ' static ,
993990 B : ReadBuffer < T > ,
994991 {
995992 StreamReader {
996993 instance : self . instance ,
997994 rep : self . rep ,
998- tx : Some ( self . instance . start_read_event_loop :: < _ , _ , U > (
995+ tx : Some ( self . instance . start_read_event_loop (
999996 store. as_context_mut ( ) ,
1000997 self . rep ,
1001998 TransmitKind :: Stream ,
@@ -1233,7 +1230,7 @@ impl ErrorContext {
12331230 }
12341231
12351232 /// Attempt to convert the specified [`Val`] to a `ErrorContext`.
1236- pub fn from_val < U , S : AsContextMut < Data = U > > ( _: S , value : & Val ) -> Result < Self > {
1233+ pub fn from_val ( _: impl AsContextMut , value : & Val ) -> Result < Self > {
12371234 let Val :: ErrorContext ( ErrorContextAny ( rep) ) = value else {
12381235 bail ! ( "expected `error-context`; got `{}`" , value. desc( ) ) ;
12391236 } ;
@@ -1516,22 +1513,18 @@ impl Instance {
15161513 /// If there's no plausible default value, and you're sure
15171514 /// `FutureWriter::write` will be called, you can consider passing `||
15181515 /// unreachable!()` as the `default` parameter.
1519- pub fn future <
1520- T : func:: Lower + func:: Lift + Send + Sync + ' static ,
1521- U : ' static ,
1522- S : AsContextMut < Data = U > ,
1523- > (
1516+ pub fn future < T : func:: Lower + func:: Lift + Send + Sync + ' static > (
15241517 self ,
15251518 default : fn ( ) -> T ,
1526- mut store : S ,
1519+ mut store : impl AsContextMut ,
15271520 ) -> Result < ( FutureWriter < T > , FutureReader < T > ) > {
15281521 let mut store = store. as_context_mut ( ) ;
15291522 let ( write, read) = self . concurrent_state_mut ( store. 0 ) . new_transmit ( ) ?;
15301523
15311524 Ok ( (
15321525 FutureWriter :: new (
15331526 default,
1534- Some ( self . start_write_event_loop :: < _ , _ , U > (
1527+ Some ( self . start_write_event_loop (
15351528 store. as_context_mut ( ) ,
15361529 write. rep ( ) ,
15371530 TransmitKind :: Future ,
@@ -1540,7 +1533,7 @@ impl Instance {
15401533 ) ,
15411534 FutureReader :: new (
15421535 read. rep ( ) ,
1543- Some ( self . start_read_event_loop :: < _ , _ , U > (
1536+ Some ( self . start_read_event_loop (
15441537 store. as_context_mut ( ) ,
15451538 read. rep ( ) ,
15461539 TransmitKind :: Future ,
@@ -1556,18 +1549,16 @@ impl Instance {
15561549 T : func:: Lower + func:: Lift + Send + ' static ,
15571550 W : WriteBuffer < T > ,
15581551 R : ReadBuffer < T > ,
1559- U : ' static ,
1560- S : AsContextMut < Data = U > ,
15611552 > (
15621553 self ,
1563- mut store : S ,
1554+ mut store : impl AsContextMut ,
15641555 ) -> Result < ( StreamWriter < W > , StreamReader < R > ) > {
15651556 let mut store = store. as_context_mut ( ) ;
15661557 let ( write, read) = self . concurrent_state_mut ( store. 0 ) . new_transmit ( ) ?;
15671558
15681559 Ok ( (
15691560 StreamWriter :: new (
1570- Some ( self . start_write_event_loop :: < _ , _ , U > (
1561+ Some ( self . start_write_event_loop (
15711562 store. as_context_mut ( ) ,
15721563 write. rep ( ) ,
15731564 TransmitKind :: Stream ,
@@ -1576,7 +1567,7 @@ impl Instance {
15761567 ) ,
15771568 StreamReader :: new (
15781569 read. rep ( ) ,
1579- Some ( self . start_read_event_loop :: < _ , _ , U > (
1570+ Some ( self . start_read_event_loop (
15801571 store. as_context_mut ( ) ,
15811572 read. rep ( ) ,
15821573 TransmitKind :: Stream ,
@@ -1598,7 +1589,7 @@ impl Instance {
15981589 fn start_write_event_loop <
15991590 T : func:: Lower + func:: Lift + Send + ' static ,
16001591 B : WriteBuffer < T > ,
1601- U : ' static ,
1592+ U ,
16021593 > (
16031594 self ,
16041595 mut store : StoreContextMut < U > ,
@@ -1668,11 +1659,7 @@ impl Instance {
16681659
16691660 /// Same as `Self::start_write_event_loop`, but for the read end of a stream
16701661 /// or future.
1671- fn start_read_event_loop <
1672- T : func:: Lower + func:: Lift + Send + ' static ,
1673- B : ReadBuffer < T > ,
1674- U : ' static ,
1675- > (
1662+ fn start_read_event_loop < T : func:: Lower + func:: Lift + Send + ' static , B : ReadBuffer < T > , U > (
16761663 self ,
16771664 mut store : StoreContextMut < U > ,
16781665 rep : u32 ,
@@ -1748,7 +1735,7 @@ impl Instance {
17481735 /// * `post_write` - Whether the transmit should be dropped after write, possibly with an error context
17491736 /// * `tx` - Oneshot channel to notify when operation completes (or drop on error)
17501737 /// * `kind` - whether this is a stream or a future
1751- fn host_write < T : func:: Lower + Send + ' static , B : WriteBuffer < T > , U : ' static > (
1738+ fn host_write < T : func:: Lower + Send + ' static , B : WriteBuffer < T > , U > (
17521739 self ,
17531740 mut store : StoreContextMut < U > ,
17541741 transmit_rep : u32 ,
@@ -1871,7 +1858,7 @@ impl Instance {
18711858 /// * `buffer` - Buffer to receive values
18721859 /// * `tx` - Oneshot channel to notify when operation completes (or drop on error)
18731860 /// * `kind` - whether this is a stream or a future
1874- fn host_read < T : func:: Lift + Send + ' static , B : ReadBuffer < T > , U : ' static > (
1861+ fn host_read < T : func:: Lift + Send + ' static , B : ReadBuffer < T > , U > (
18751862 self ,
18761863 mut store : StoreContextMut < U > ,
18771864 rep : u32 ,
@@ -2792,7 +2779,7 @@ impl Instance {
27922779 ///
27932780 /// SAFETY: `memory` and `realloc` must be valid pointers to their
27942781 /// respective guest entities.
2795- pub ( super ) unsafe fn error_context_debug_message < T : ' static > (
2782+ pub ( super ) unsafe fn error_context_debug_message < T > (
27962783 self ,
27972784 store : StoreContextMut < T > ,
27982785 memory : * mut VMMemoryDefinition ,
0 commit comments