Skip to content

Commit 58ac1b4

Browse files
authored
Rollup merge of #123528 - dtolnay:asyncgeninternals, r=compiler-errors
Hide async_gen_internals from standard library documentation These are from #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)
2 parents fc2dbbb + 262670a commit 58ac1b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/async_iter/async_iter.rs

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ where
116116
impl<T> Poll<Option<T>> {
117117
/// A helper function for internal desugaring -- produces `Ready(Some(t))`,
118118
/// which corresponds to the async iterator yielding a value.
119+
#[doc(hidden)]
119120
#[unstable(feature = "async_gen_internals", issue = "none")]
120121
#[lang = "AsyncGenReady"]
121122
pub fn async_gen_ready(t: T) -> Self {
@@ -124,13 +125,15 @@ impl<T> Poll<Option<T>> {
124125

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

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

0 commit comments

Comments
 (0)