Skip to content

Commit

Permalink
docs: Fix rendering issue with misaligned tooltips.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky authored and hawkw committed Jun 10, 2021
1 parent 6b7051c commit 3ddf54f
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 81 deletions.
14 changes: 0 additions & 14 deletions tracing-core/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@
//! // `my_collector` is now the default
//! ```
//!
//! <div class="information">
//! <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
//! </div>
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//!
Expand Down Expand Up @@ -241,9 +238,6 @@ pub struct DefaultGuard(Option<Dispatch>);
/// The default dispatcher is used when creating a new [span] or
/// [`Event`].
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This function required the Rust standard library.
Expand All @@ -269,9 +263,6 @@ pub fn with_default<T>(dispatcher: &Dispatch, f: impl FnOnce() -> T) -> T {
/// Sets the dispatch as the default dispatch for the duration of the lifetime
/// of the returned DefaultGuard
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand All @@ -297,8 +288,6 @@ pub fn set_default(dispatcher: &Dispatch) -> DefaultGuard {
/// Returns `Err` if the global default has already been set.
///
///
/// <div class="information">
/// <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
/// </div><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
Expand Down Expand Up @@ -734,9 +723,6 @@ impl Dispatch {
/// This calls the [`drop_span`] function on the [`Collect`] that this
/// `Dispatch` forwards to.
///
/// <div class="information">
/// <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
///
/// **Deprecated**: The [`try_close`] method is functionally identical, but returns `true` if the span is now closed.
Expand Down
9 changes: 0 additions & 9 deletions tracing-core/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ pub struct Iter {
/// `examples/counters.rs`, which demonstrates a very simple metrics system
/// implemented using `tracing`.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: The <code>record_error</code> trait method is only
Expand Down Expand Up @@ -204,9 +201,6 @@ pub trait Visit {

/// Records a type implementing `Error`.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This is only enabled when the Rust standard library is
Expand Down Expand Up @@ -631,9 +625,6 @@ impl FieldSet {

/// Returns `true` if `self` contains the given `field`.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: If <code>field</code> shares a name with a field
Expand Down
3 changes: 0 additions & 3 deletions tracing-core/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ use core::{
/// _significantly_ lower than that of creating the actual span. Therefore,
/// filtering is based on metadata, rather than on the constructed span.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down
5 changes: 1 addition & 4 deletions tracing-core/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ enum CurrentInner {
impl Id {
/// Constructs a new span ID from the given `u64`.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: Span IDs must be greater than zero.</pre></div>
///
/// # Panics
/// - If the provided `u64` is 0
/// - If the provided `u64` is 0.
pub fn from_u64(u: u64) -> Self {
Id(NonZeroU64::new(u).expect("span IDs must be > 0"))
}
Expand Down
3 changes: 0 additions & 3 deletions tracing-subscriber/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ pub trait LookupSpan<'a> {

/// Returns the [`SpanData`] for a given [`Id`], if it exists.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down
18 changes: 0 additions & 18 deletions tracing-subscriber/src/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ where
/// By default, this returns [`Interest::always()`] if [`self.enabled`] returns
/// true, or [`Interest::never()`] if it returns false.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down Expand Up @@ -253,9 +250,6 @@ where
/// By default, this always returns `true`, allowing the wrapped collector
/// to choose to disable the span.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down Expand Up @@ -998,9 +992,6 @@ where
/// If this returns `None`, then no span exists for that ID (either it has
/// closed or the ID is invalid).
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand All @@ -1022,9 +1013,6 @@ where

/// Returns `true` if an active span exists for the given `Id`.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand All @@ -1047,9 +1035,6 @@ where
///
/// If this returns `None`, then we are not currently within a span.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down Expand Up @@ -1084,9 +1069,6 @@ where
///
/// If this iterator is empty, then there are no spans in the current context.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down
3 changes: 0 additions & 3 deletions tracing/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@
//!
//! // `my_collector` is now the default
//! ```
//! <div class="information">
//! <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
//! </div>
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//!
Expand Down
3 changes: 0 additions & 3 deletions tracing/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ use crate::Metadata;

/// Trait implemented to allow a type to be used as a field key.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down
6 changes: 0 additions & 6 deletions tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
//! The [`span` module][mod@span]'s documentation provides further details on how to
//! use spans.
//!
//! <div class="information">
//! <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
//! </div><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,
Expand Down Expand Up @@ -582,7 +580,6 @@
//! ```
//!
//! <div class="information">
//! <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
//! </div><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
Expand Down Expand Up @@ -825,9 +822,6 @@
//! [`tracing-elastic-apm`]: https://crates.io/crates/tracing-elastic-apm
//! [Elastic APM]: https://www.elastic.co/apm
//!
//! <div class="information">
//! <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
//! </div>
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//! <strong>Note</strong>: Some of these ecosystem crates are currently
Expand Down
20 changes: 2 additions & 18 deletions tracing/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
//! // Dropping the `_enter` guard will exit the span.
//!```
//!
//! <div class="information">
//! <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
//! </div><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,
Expand Down Expand Up @@ -106,12 +104,9 @@
//! });
//! ```
//!
//! <div class="information">
//! <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
//! </div>
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//! <strong>Note</strong>: Since entering a span takes <code>&self</code<, and
//! <strong>Note</strong>: Since entering a span takes <code>&self</code>, and
//! <code>Span</code>s are <code>Clone</code>, <code>Send</code>, and
//! <code>Sync</code>, it is entirely valid for multiple threads to enter the
//! same span concurrently.
Expand Down Expand Up @@ -595,9 +590,6 @@ impl Span {
/// will call [`Collect::exit`]. If the span is disabled, this does
/// nothing.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand All @@ -612,9 +604,7 @@ impl Span {
/// **Warning**: in asynchronous code that uses [async/await syntax][syntax],
/// [`Span::enter`] should be used very carefully or avoided entirely. Holding
/// the drop guard returned by `Span::enter` across `.await` points will
/// result in incorrect traces.
///
/// For example,
/// result in incorrect traces. For example,
///
/// ```
/// # use tracing::info_span;
Expand Down Expand Up @@ -824,9 +814,6 @@ impl Span {
/// Furthermore, `entered` may be used when the span must be stored in some
/// other struct or be passed to a function while remaining entered.
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down Expand Up @@ -1043,9 +1030,6 @@ impl Span {
/// }
/// ```
///
/// <div class="information">
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
///
Expand Down

0 comments on commit 3ddf54f

Please sign in to comment.