From 946cb9283cabcc9ec0912c7d5afeb4c1d20af586 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Fri, 17 Jan 2020 15:10:16 -0800 Subject: [PATCH] Require that imported functions must be `Send` --- lib/runtime-core/src/typed_func.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime-core/src/typed_func.rs b/lib/runtime-core/src/typed_func.rs index 9de9d40e2e3..f0c22c31d1b 100644 --- a/lib/runtime-core/src/typed_func.rs +++ b/lib/runtime-core/src/typed_func.rs @@ -430,7 +430,7 @@ macro_rules! impl_traits { $( $x: WasmExternType, )* Rets: WasmTypeList, Trap: TrapEarly, - FN: Fn(&mut vm::Ctx $( , $x )*) -> Trap + 'static, + FN: Fn(&mut vm::Ctx $( , $x )*) -> Trap + 'static + Send, { #[allow(non_snake_case)] fn to_raw(self) -> (NonNull, Option>) { @@ -545,7 +545,7 @@ macro_rules! impl_traits { $( $x: WasmExternType, )* Rets: WasmTypeList, Trap: TrapEarly, - FN: Fn($( $x, )*) -> Trap + 'static, + FN: Fn($( $x, )*) -> Trap + 'static + Send, { #[allow(non_snake_case)] fn to_raw(self) -> (NonNull, Option>) {