From 4847c097b46265963bbf9cd8006456b3ff31169b Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 4 Feb 2019 22:41:39 +0900 Subject: [PATCH] Add #[must_use] to core::task::Poll --- src/libcore/task/poll.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/task/poll.rs b/src/libcore/task/poll.rs index 27b1139e15c..ac656153519 100644 --- a/src/libcore/task/poll.rs +++ b/src/libcore/task/poll.rs @@ -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 { /// Represents that a value is immediately ready.