|
6 | 6 | /// has been created through a [`Linker`](wasmtime::component::Linker).
|
7 | 7 | ///
|
8 | 8 | /// For more information see [`TheWorld`] as well.
|
9 |
| -pub struct TheWorldPre<T> { |
| 9 | +pub struct TheWorldPre<T: 'static> { |
10 | 10 | instance_pre: wasmtime::component::InstancePre<T>,
|
11 | 11 | indices: TheWorldIndices,
|
12 | 12 | }
|
13 |
| -impl<T> Clone for TheWorldPre<T> { |
| 13 | +impl<T: 'static> Clone for TheWorldPre<T> { |
14 | 14 | fn clone(&self) -> Self {
|
15 | 15 | Self {
|
16 | 16 | instance_pre: self.instance_pre.clone(),
|
17 | 17 | indices: self.indices.clone(),
|
18 | 18 | }
|
19 | 19 | }
|
20 | 20 | }
|
21 |
| -impl<_T> TheWorldPre<_T> { |
| 21 | +impl<_T: 'static> TheWorldPre<_T> { |
22 | 22 | /// Creates a new copy of `TheWorldPre` bindings which can then
|
23 | 23 | /// be used to instantiate into a particular store.
|
24 | 24 | ///
|
@@ -157,7 +157,8 @@ const _: () = {
|
157 | 157 | get: impl Fn(&mut T) -> &mut U + Send + Sync + Copy + 'static,
|
158 | 158 | ) -> wasmtime::Result<()>
|
159 | 159 | where
|
160 |
| - T: Send + foo::foo::conventions::Host<Data = T> + 'static, |
| 160 | + T: 'static, |
| 161 | + T: Send + foo::foo::conventions::Host<Data = T>, |
161 | 162 | U: Send + foo::foo::conventions::Host<Data = T>,
|
162 | 163 | {
|
163 | 164 | foo::foo::conventions::add_to_linker(linker, get)?;
|
@@ -329,6 +330,7 @@ pub mod foo {
|
329 | 330 | host_getter: G,
|
330 | 331 | ) -> wasmtime::Result<()>
|
331 | 332 | where
|
| 333 | + T: 'static, |
332 | 334 | G: for<'a> wasmtime::component::GetHost<
|
333 | 335 | &'a mut T,
|
334 | 336 | Host: Host<Data = T> + Send,
|
@@ -708,6 +710,7 @@ pub mod foo {
|
708 | 710 | get: impl Fn(&mut T) -> &mut U + Send + Sync + Copy + 'static,
|
709 | 711 | ) -> wasmtime::Result<()>
|
710 | 712 | where
|
| 713 | + T: 'static, |
711 | 714 | U: Host<Data = T> + Send,
|
712 | 715 | T: Send + 'static,
|
713 | 716 | {
|
|
0 commit comments