about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/task/poll.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/core/src/task/poll.rs b/library/core/src/task/poll.rs
index 9383e7c45fa..4e987a53b2c 100644
--- a/library/core/src/task/poll.rs
+++ b/library/core/src/task/poll.rs
@@ -112,6 +112,14 @@ impl<T, E> Poll<Option<Result<T, E>>> {
 
 #[stable(feature = "futures_api", since = "1.36.0")]
 impl<T> From<T> for Poll<T> {
+    /// Convert to a `Ready` variant.
+    ///
+    /// # Example
+    ///
+    /// ```
+    /// # use core::task::Poll;
+    /// assert_eq!(Poll::from(true), Poll::Ready(true));
+    /// ```
     fn from(t: T) -> Poll<T> {
         Poll::Ready(t)
     }