We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Poll
library\core
1 parent 407add0 commit d711f47Copy full SHA for d711f47
core/tests/lib.rs
@@ -76,5 +76,6 @@ mod result;
76
mod slice;
77
mod str;
78
mod str_lossy;
79
+mod task;
80
mod time;
81
mod tuple;
core/tests/task.rs
@@ -0,0 +1,14 @@
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
+}
0 commit comments