From 189781f0c21f13ce75b52c92a8e91e23febb0fa3 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Mon, 22 Feb 2021 15:39:51 +0100 Subject: [PATCH] Document poll!(stream.next()) pattern for poll!(..) --- futures-util/src/async_await/poll.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/futures-util/src/async_await/poll.rs b/futures-util/src/async_await/poll.rs index ac70a53a17..b5782df130 100644 --- a/futures-util/src/async_await/poll.rs +++ b/futures-util/src/async_await/poll.rs @@ -9,6 +9,10 @@ use futures_core::task::{Context, Poll}; /// This macro is only usable inside of `async` functions, closures, and blocks. /// It is also gated behind the `async-await` feature of this library, which is /// activated by default. +/// +/// If you need the result of polling a [`Stream`](crate::stream::Stream), +/// you can use this macro with the [`next`](crate::stream::StreamExt::next) method: +/// `poll!(stream.next())`. #[macro_export] macro_rules! poll { ($x:expr $(,)?) => {