diff --git a/src/host.rs b/src/host.rs index 09b6c85..ad5d854 100644 --- a/src/host.rs +++ b/src/host.rs @@ -34,7 +34,7 @@ impl<'a> RuntimeArgs<'a> { } /// Custom user error. -pub trait HostError: 'static + ::std::fmt::Display + ::std::fmt::Debug { +pub trait HostError: 'static + ::std::fmt::Display + ::std::fmt::Debug + Send + Sync { #[doc(hidden)] fn __private_get_type_id__(&self) -> TypeId { TypeId::of::() diff --git a/src/tests/mod.rs b/src/tests/mod.rs index fb33a01..c202910 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -1,2 +1,15 @@ mod host; mod wasm; + +use super::Error; + +fn assert_send() {} +fn assert_sync() {} +fn assert_std_err_impl() {} + +#[test] +fn assert_error_properties() { + assert_send::(); + assert_sync::(); + assert_std_err_impl::(); +}