Skip to content

Commit e5464b4

Browse files
mattklein123notgull
authored andcommitted
StackSlot should be send
Signed-off-by: Matt Klein <[email protected]>
1 parent ec0c6f9 commit e5464b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,14 @@ impl<T> Event<T> {
508508
/// assert_eq!(event.total_listeners(), 0);
509509
///
510510
/// let listener1 = event.listen();
511-
/// assert_eq!(event.total_listeners(), 1);
511+
/// assert_eq!(event.total_listeners(), 1);
512512
///
513513
/// let listener2 = event.listen();
514-
/// assert_eq!(event.total_listeners(), 2);
514+
/// assert_eq!(event.total_listeners(), 2);
515515
///
516516
/// drop(listener1);
517517
/// drop(listener2);
518-
/// assert_eq!(event.total_listeners(), 0);
518+
/// assert_eq!(event.total_listeners(), 0);
519519
/// ```
520520
#[cfg(feature = "std")]
521521
#[inline]
@@ -1364,6 +1364,7 @@ fn __test_send_and_sync() {
13641364
fn _assert_send<T: Send>() {}
13651365
fn _assert_sync<T: Sync>() {}
13661366

1367+
_assert_send::<crate::__private::StackSlot<'_, ()>>();
13671368
_assert_send::<Event<()>>();
13681369
_assert_sync::<Event<()>>();
13691370
_assert_send::<EventListener<()>>();
@@ -1408,6 +1409,7 @@ pub mod __private {
14081409

14091410
impl<T> core::panic::UnwindSafe for StackSlot<'_, T> {}
14101411
impl<T> core::panic::RefUnwindSafe for StackSlot<'_, T> {}
1412+
unsafe impl<T> Send for StackSlot<'_, T> {}
14111413

14121414
impl<'ev, T> StackSlot<'ev, T> {
14131415
/// Create a new `StackSlot` on the stack.

0 commit comments

Comments
 (0)