Require the Send trait for TargetIsa

The `TargetIsa` trait already requires that the implementor is `Sync` to
be shared across threads, and this commit adds in an additional
restriction of `Send` to ensure that the type can be sent-by-value
across threads as well.

This is part of an effort to make various data structures in `wasmtime`
sendable/shareable across threads.
This commit is contained in:
Alex Crichton
2020-01-08 09:10:53 -08:00
committed by Benjamin Bouvier
parent 3a4b1cc989
commit 04d233301c

View File

@@ -198,7 +198,7 @@ impl TargetFrontendConfig {
/// Methods that are specialized to a target ISA. Implies a Display trait that shows the
/// shared flags, as well as any isa-specific flags.
pub trait TargetIsa: fmt::Display + Sync {
pub trait TargetIsa: fmt::Display + Send + Sync {
/// Get the name of this ISA.
fn name(&self) -> &'static str;