From e0960e6946797affbab205fcccbd2c0f9f769c38 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sat, 9 Oct 2021 12:54:58 +0200 Subject: [PATCH] Ignore non_send_fields_in_send_ty for ActorRef And for related types. We know the underlying type is Send, so so it the ActorRef. --- src/actor_ref/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/actor_ref/mod.rs b/src/actor_ref/mod.rs index af99a1757..16c7b4a08 100644 --- a/src/actor_ref/mod.rs +++ b/src/actor_ref/mod.rs @@ -142,6 +142,7 @@ enum ActorRefKind { // variant is a boxed version of `Local` so is that variant. This makes the // entire `ActorRefKind` `Send` and `Sync`, as long as `M` is `Send` (as we // could be sending the message across thread bounds). +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl Send for ActorRefKind {} unsafe impl Sync for ActorRefKind {} @@ -463,6 +464,7 @@ enum SendValueKind<'r, M> { // variant is a boxed version of `Local` so is that variant. This makes the // entire `SendValueKind` `Send` and `Sync`, as long as `M` is `Send` (as we // could be sending the message across thread bounds). +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl<'r, M: Send> Send for SendValueKind<'r, M> {} unsafe impl<'r, M: Send> Sync for SendValueKind<'r, M> {} @@ -525,6 +527,7 @@ enum JoinKind<'r, M> { // variant is a boxed version of `Local` so is that variant. This makes the // entire `JoinKind` `Send` and `Sync`, as long as `M` is `Send` (as we could be // sending the message across thread bounds). +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl<'r, M: Send> Send for JoinKind<'r, M> {} unsafe impl<'r, M: Send> Sync for JoinKind<'r, M> {}