diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index b2e6303887..7f13308f16 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -122,8 +122,7 @@ contained in the `cx` parameter.", impl #type_name { #[doc = #constructor_docs] - pub fn new(store: &wasmtime::Store, cx: #ctx_type) -> Self { - let cx = std::rc::Rc::new(std::cell::RefCell::new(cx)); + pub fn new(store: &wasmtime::Store, cx: std::rc::Rc>) -> Self { #(#ctor_externs)* Self {