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

doc: remove misleading doc #2220

Merged
merged 2 commits into from
Jul 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions tracing/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ pub use tracing_core::collect::*;
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use tracing_core::dispatch::DefaultGuard;

/// Sets this collector as the default for the duration of a closure.
/// Sets this collector as the default for the current thread for the duration
/// of a closure.
hawkw marked this conversation as resolved.
Show resolved Hide resolved
///
/// The default collector is used when creating a new [`Span`] or
/// [`Event`], _if no span is currently executing_. If a span is currently
/// executing, new spans or events are dispatched to the collector that
/// tagged that span, instead.
/// [`Event`].
///
/// [`Span`]: super::span::Span
/// [`Collect`]: super::collect::Collect
/// [`Event`]: tracing_core::Event
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
Expand Down Expand Up @@ -43,13 +41,11 @@ where
crate::dispatch::set_global_default(crate::Dispatch::new(collector))
}

/// Sets the collector as the default for the duration of the lifetime of the
/// returned [`DefaultGuard`]
/// Sets the collector as the default for the current thread for the duration of
/// the lifetime of the returned [`DefaultGuard`].
hawkw marked this conversation as resolved.
Show resolved Hide resolved
///
/// The default collector is used when creating a new [`Span`] or
/// [`Event`], _if no span is currently executing_. If a span is currently
/// executing, new spans or events are dispatched to the collector that
/// tagged that span, instead.
/// [`Event`].
///
/// [`Span`]: super::span::Span
/// [`Event`]: tracing_core::Event
Expand Down