Skip to content

Commit 64f0032

Browse files
authored
Rollup merge of rust-lang#58145 - taiki-e:poll, r=cramertj
Add #[must_use] to core::task::Poll cc rust-lang/rfcs#2592 r? @withoutboats
2 parents ff097ca + 4847c09 commit 64f0032

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/task/poll.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use result::Result;
77

88
/// Indicates whether a value is available or if the current task has been
99
/// scheduled to receive a wakeup instead.
10+
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"]
1011
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1112
pub enum Poll<T> {
1213
/// Represents that a value is immediately ready.

0 commit comments

Comments
 (0)