diff --git a/tracing-core/src/dispatch.rs b/tracing-core/src/dispatch.rs index 30a5fab69a..018b051c2c 100644 --- a/tracing-core/src/dispatch.rs +++ b/tracing-core/src/dispatch.rs @@ -291,7 +291,7 @@ pub fn set_default(dispatcher: &Dispatch) -> DefaultGuard { /// Returns `Err` if the global default has already been set. /// /// -///
+////// 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 collector later. diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 412a9dbb62..1ed8c90dc5 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -52,7 +52,7 @@ //! The [`span` module][mod@span]'s documentation provides further details on how to //! use spans. //! -//!+//!//! //! **Warning**: In asynchronous code that uses async/await syntax, //! `Span::enter` may produce incorrect traces if the returned drop diff --git a/tracing/src/span.rs b/tracing/src/span.rs index 8a6ffe05f0..bc8741e025 100644 --- a/tracing/src/span.rs +++ b/tracing/src/span.rs @@ -76,7 +76,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