Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: backport #1722 #1724

Merged
merged 1 commit into from Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tracing-core/src/dispatcher.rs
Expand Up @@ -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.
///
/// <pre class="compile_fail" style="white-space:normal;font:inherit;">
/// <div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
/// <strong>Warning</strong>: In general, libraries should <em>not</em> call
/// <code>set_global_default()</code>! Doing so will cause conflicts when
/// executables that depend on the library try to set the default later.
/// </pre>
/// </pre></div>
///
/// [span]: ../span/index.html
/// [`Subscriber`]: ../subscriber/trait.Subscriber.html
Expand Down
15 changes: 8 additions & 7 deletions tracing/src/lib.rs
Expand Up @@ -51,13 +51,14 @@
//! The [`span` module][span]'s documentation provides further details on how to
//! use spans.
//!
//! <pre class="compile_fail" style="white-space:normal;font:inherit;">
//! <strong>Warning</strong>: In asynchronous code that uses async/await syntax,
//! <code>Span::enter</code> may produce incorrect traces if the returned drop
//! guard is held across an await point. See
//! <a href="span/struct.Span.html#in-asynchronous-code">the method documentation</a>
//! for details.
//! </pre>
//! <div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
//!
//! **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.
//!
hawkw marked this conversation as resolved.
Show resolved Hide resolved
//! </pre></div>
//!
//! ## Events
//!
Expand Down
2 changes: 1 addition & 1 deletion tracing/src/span.rs
Expand Up @@ -75,7 +75,7 @@
//! // Dropping the `_enter` guard will exit the span.
//!```
//!
//! </div><div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
//! <div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
//! <strong>Warning</strong>: In asynchronous code that uses async/await syntax,
//! <code>Span::enter</code> may produce incorrect traces if the returned drop
//! guard is held across an await point. See
Expand Down