about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-02-06 00:29:15 +0900
committerGitHub <noreply@github.com>2019-02-06 00:29:15 +0900
commit64f0032a3739b18ae45387744340d9c7ce48b145 (patch)
tree885838114d8fbd7748b2ce47358503f1460b31d9 /src/libcore
parentff097ca7736d833759569f81668034ea01fe7d73 (diff)
parent4847c097b46265963bbf9cd8006456b3ff31169b (diff)
downloadrust-64f0032a3739b18ae45387744340d9c7ce48b145.tar.gz
rust-64f0032a3739b18ae45387744340d9c7ce48b145.zip
Rollup merge of #58145 - taiki-e:poll, r=cramertj
Add #[must_use] to core::task::Poll

cc rust-lang/rfcs#2592

r? @withoutboats
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/task/poll.rs1
1 files changed, 1 insertions, 0 deletions
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<T> {
     /// Represents that a value is immediately ready.