From c274459bab039e48c9fe71aa49979ac175ce8ea3 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Tue, 23 Jan 2018 16:57:09 +0300 Subject: [PATCH] Make Error: Sync + Send --- src/host.rs | 2 +- src/tests/mod.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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::(); +}