Make Error: Sync + Send
This commit is contained in:
parent
88c25b6361
commit
c274459bab
|
@ -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::<Self>()
|
||||
|
|
|
@ -1,2 +1,15 @@
|
|||
mod host;
|
||||
mod wasm;
|
||||
|
||||
use super::Error;
|
||||
|
||||
fn assert_send<T: Send>() {}
|
||||
fn assert_sync<T: Sync>() {}
|
||||
fn assert_std_err_impl<T: ::std::error::Error>() {}
|
||||
|
||||
#[test]
|
||||
fn assert_error_properties() {
|
||||
assert_send::<Error>();
|
||||
assert_sync::<Error>();
|
||||
assert_std_err_impl::<Error>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue