]> git.lizzy.rs Git - rust.git/blob - library/core/tests/task.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / library / core / tests / task.rs
1 use core::task::Poll;
2
3 #[test]
4 fn poll_const() {
5     // test that the methods of `Poll` are usable in a const context
6
7     const POLL: Poll<usize> = Poll::Pending;
8
9     const IS_READY: bool = POLL.is_ready();
10     assert!(!IS_READY);
11
12     const IS_PENDING: bool = POLL.is_pending();
13     assert!(IS_PENDING);
14 }