From 04d233301c56d15b476f19488475847f56fa32af Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 8 Jan 2020 09:10:53 -0800 Subject: [PATCH] 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. --- cranelift/codegen/src/isa/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs index 5679333394..4b0a3e7de7 100644 --- a/cranelift/codegen/src/isa/mod.rs +++ b/cranelift/codegen/src/isa/mod.rs @@ -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;