Skip to content

Commit

Permalink
Unrolled build for rust-lang#123528
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#123528 - dtolnay:asyncgeninternals, r=compiler-errors

Hide async_gen_internals from standard library documentation

These are from rust-lang#118420. It doesn't appear that there is any intention to ever make these APIs available to user code. These are just conveniences meant for the compiler's implementation of `async gen`. I don't think having them featured in documentation in <https://doc.rust-lang.org/1.77.1/core/task/enum.Poll.html> is appropriate.

![image](https://github.com/rust-lang/rust/assets/1940490/0a8ae90d-5c83-4ab1-b08a-50bad2433d69)
  • Loading branch information
rust-timer authored Apr 6, 2024
2 parents 8d490e3 + 262670a commit 5acf2bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/core/src/async_iter/async_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ where
impl<T> Poll<Option<T>> {
/// A helper function for internal desugaring -- produces `Ready(Some(t))`,
/// which corresponds to the async iterator yielding a value.
#[doc(hidden)]
#[unstable(feature = "async_gen_internals", issue = "none")]
#[lang = "AsyncGenReady"]
pub fn async_gen_ready(t: T) -> Self {
Expand All @@ -124,13 +125,15 @@ impl<T> Poll<Option<T>> {

/// A helper constant for internal desugaring -- produces `Pending`,
/// which corresponds to the async iterator pending on an `.await`.
#[doc(hidden)]
#[unstable(feature = "async_gen_internals", issue = "none")]
#[lang = "AsyncGenPending"]
// FIXME(gen_blocks): This probably could be deduplicated.
pub const PENDING: Self = Poll::Pending;

/// A helper constant for internal desugaring -- produces `Ready(None)`,
/// which corresponds to the async iterator finishing its iteration.
#[doc(hidden)]
#[unstable(feature = "async_gen_internals", issue = "none")]
#[lang = "AsyncGenFinished"]
pub const FINISHED: Self = Poll::Ready(None);
Expand Down

0 comments on commit 5acf2bf

Please sign in to comment.