Rollup merge of #58145 - taiki-e:poll, r=cramertj

Add #[must_use] to core::task::Poll

cc rust-lang/rfcs#2592

r? @withoutboats
This commit is contained in:
kennytm 2019-02-06 00:29:15 +09:00 committed by GitHub
commit 64f0032a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ use result::Result;
/// Indicates whether a value is available or if the current task has been
/// scheduled to receive a wakeup instead.
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Poll<T> {
/// Represents that a value is immediately ready.