From 105f3c518f85695caceb1bc98e9d3c8c93c1dc19 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Thu, 8 Feb 2024 10:55:44 -0700 Subject: [PATCH] StackSlot should be send Signed-off-by: Matt Klein --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7ac0016..d0af19f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -508,14 +508,14 @@ impl Event { /// assert_eq!(event.total_listeners(), 0); /// /// let listener1 = event.listen(); - /// assert_eq!(event.total_listeners(), 1); + /// assert_eq!(event.total_listeners(), 1); /// /// let listener2 = event.listen(); - /// assert_eq!(event.total_listeners(), 2); + /// assert_eq!(event.total_listeners(), 2); /// /// drop(listener1); /// drop(listener2); - /// assert_eq!(event.total_listeners(), 0); + /// assert_eq!(event.total_listeners(), 0); /// ``` #[cfg(feature = "std")] #[inline] @@ -1364,6 +1364,7 @@ fn __test_send_and_sync() { fn _assert_send() {} fn _assert_sync() {} + _assert_send::>(); _assert_send::>(); _assert_sync::>(); _assert_send::>(); @@ -1408,6 +1409,7 @@ pub mod __private { impl core::panic::UnwindSafe for StackSlot<'_, T> {} impl core::panic::RefUnwindSafe for StackSlot<'_, T> {} + unsafe impl Send for StackSlot<'_, T> {} impl<'ev, T> StackSlot<'ev, T> { /// Create a new `StackSlot` on the stack.