1 use core::task::{Poll, RawWaker, RawWakerVTable, Waker};
5 // test that the methods of `Poll` are usable in a const context
7 const POLL: Poll<usize> = Poll::Pending;
9 const IS_READY: bool = POLL.is_ready();
12 const IS_PENDING: bool = POLL.is_pending();
18 const VOID_TABLE: RawWakerVTable = RawWakerVTable::new(|_| VOID_WAKER, |_| {}, |_| {}, |_| {});
20 const VOID_WAKER: RawWaker = RawWaker::new(&(), &VOID_TABLE);
22 static WAKER: Waker = unsafe { Waker::from_raw(VOID_WAKER) };