diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs index bced7cfe4c95..aec6c1ba06f6 100644 --- a/crates/wasmtime/src/instance.rs +++ b/crates/wasmtime/src/instance.rs @@ -905,6 +905,17 @@ pub struct InstancePre { _marker: std::marker::PhantomData T>, } +/// InstancePre's clone does not require T: Clone +impl Clone for InstancePre { + fn clone(&self) -> Self { + Self { + module: self.module.clone(), + items: self.items.clone(), + _marker: self._marker, + } + } +} + impl InstancePre { pub(crate) unsafe fn new( store: &mut StoreOpaque,