pub fn panic_waker_ref() -> &'static Waker {
    struct SyncRawWaker(RawWaker);
    unsafe impl Sync for SyncRawWaker {}

    static PANIC_WAKER_INSTANCE: SyncRawWaker = SyncRawWaker(raw_panic_waker());

    // SAFETY: `Waker` is #[repr(transparent)] over its `RawWaker`.
    unsafe { &*(&PANIC_WAKER_INSTANCE.0 as *const RawWaker as *const Waker) }
}
Get a global reference to a
[`Waker`](futures_core::task::Waker) referencing a singleton
instance of a [`Waker`] which panics when woken.

# Examples

```should_panic
use futures_test::task::panic_waker_ref;

let waker = panic_waker_ref();
waker.wake_by_ref(); // Will panic
```
futures-test/src/task/panic_waker.rs