futures_test::task

Function panic_waker_ref

source
pub fn panic_waker_ref() -> &'static Waker
Expand description

Get a global reference to a Waker referencing a singleton instance of a Waker which panics when woken.

§Examples

use futures_test::task::panic_waker_ref;

let waker = panic_waker_ref();
waker.wake_by_ref(); // Will panic