diff --git a/tokio/src/runtime/task/mod.rs b/tokio/src/runtime/task/mod.rs index eb8284ff6be..0a01860aa0c 100644 --- a/tokio/src/runtime/task/mod.rs +++ b/tokio/src/runtime/task/mod.rs @@ -249,6 +249,12 @@ pub fn id() -> Id { /// This function is similar to [`task::id()`](crate::runtime::task::id()), except /// that it returns `None` rather than panicking if called outside of a task /// context. +/// +/// **Note**: This is an [unstable API][unstable]. The public API of this type +/// may break in 1.x releases. See [the documentation on unstable +/// features][unstable] for details. +/// +/// [task ID]: crate::task::Id #[cfg_attr(not(tokio_unstable), allow(unreachable_pub))] #[track_caller] pub fn try_id() -> Option {