diff --git a/tracing-core/src/dispatcher.rs b/tracing-core/src/dispatcher.rs index 61d5b0b73a..a52ea8fae8 100644 --- a/tracing-core/src/dispatcher.rs +++ b/tracing-core/src/dispatcher.rs @@ -255,11 +255,11 @@ pub fn set_default(dispatcher: &Dispatch) -> DefaultGuard { /// Can only be set once; subsequent attempts to set the global default will fail. /// Returns `Err` if the global default has already been set. /// -///
+////// /// [span]: ../span/index.html /// [`Subscriber`]: ../subscriber/trait.Subscriber.html diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index a804b48b44..a89e8f96ec 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -51,13 +51,14 @@ //! The [`span` module][span]'s documentation provides further details on how to //! use spans. //! -//!/// Warning: In general, libraries should not call ///+///set_global_default()
! Doing so will cause conflicts when /// executables that depend on the library try to set the default later. -///-//! Warning: In asynchronous code that uses async/await syntax, -//!+//!Span::enter
may produce incorrect traces if the returned drop -//! guard is held across an await point. See -//! the method documentation -//! for details. -//!//! //! ## Events //! diff --git a/tracing/src/span.rs b/tracing/src/span.rs index 9a60d6f1c7..32c78959e6 100644 --- a/tracing/src/span.rs +++ b/tracing/src/span.rs @@ -75,7 +75,7 @@ //! // Dropping the `_enter` guard will exit the span. //!``` //! -//!+//! +//! **Warning**: In asynchronous code that uses async/await syntax, +//! `Span::enter` may produce incorrect traces if the returned drop +//! guard is held across an await point. See +//! [the method documentation][Span#in-asynchronous-code] for details. +//! +//!+//!//! Warning: In asynchronous code that uses async/await syntax, //!Span::enter
may produce incorrect traces if the returned drop //! guard is held across an await point. See