From bdd64cc9d3561115d125584484404e9d1f7d7cca Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Tue, 6 May 2025 10:46:05 +0200 Subject: [PATCH] runtime: add doc note that `on_*_task_poll` is unstable (#7311) --- tokio/src/runtime/builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index 47ba18c96..93c67c5b5 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -770,6 +770,7 @@ impl Builder { /// # } /// ``` #[cfg(tokio_unstable)] + #[cfg_attr(docsrs, doc(cfg(tokio_unstable)))] pub fn on_before_task_poll(&mut self, f: F) -> &mut Self where F: Fn(&TaskMeta<'_>) + Send + Sync + 'static, @@ -813,6 +814,7 @@ impl Builder { /// # } /// ``` #[cfg(tokio_unstable)] + #[cfg_attr(docsrs, doc(cfg(tokio_unstable)))] pub fn on_after_task_poll(&mut self, f: F) -> &mut Self where F: Fn(&TaskMeta<'_>) + Send + Sync + 'static,