Skip to content

Commit

Permalink
link to Future::poll from the Poll docs
Browse files Browse the repository at this point in the history
The most important thing about Poll is that Future::poll returns it, but
previously the docs didn't emphasize this.
  • Loading branch information
oconnor663 committed Aug 25, 2024
1 parent f167efa commit f14a115
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/task/poll.rs
Original file line number Diff line number Diff line change
@@ -5,6 +5,10 @@ use crate::ops::{self, ControlFlow};

/// Indicates whether a value is available or if the current task has been
/// scheduled to receive a wakeup instead.
///
/// This is the return type of <code>[Future::poll]</code>.
///
/// [Future::poll]: ../future/trait.Future.html "Future"
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[lang = "Poll"]

0 comments on commit f14a115

Please sign in to comment.