Skip to content

Commit 9e07ff8

Browse files
authored
docs: Switch to even more intra-doc links (#1084)
1 parent e7f57e4 commit 9e07ff8

File tree

26 files changed

+137
-136
lines changed

26 files changed

+137
-136
lines changed

tracing-appender/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
//!
8989
//! The [`non_blocking` module][non_blocking]'s documentation provides more detail on how to use `non_blocking`.
9090
//!
91-
//! [write]: https://doc.rust-lang.org/std/io/trait.Write.html
91+
//! [write]: std::io::Write
9292
//! [non_blocking]: mod@non_blocking
9393
//! [guard]: non_blocking::WorkerGuard
9494
//! [make_writer]: tracing_subscriber::fmt::MakeWriter

tracing-appender/src/rolling.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A rolling file appender.
22
//!
3-
//! Creates a new log file at a fixed frequency as defined by [`Rotation`](struct.Rotation.html).
3+
//! Creates a new log file at a fixed frequency as defined by [`Rotation`].
44
//! Logs will be written to this file for the duration of the period and will automatically roll over
55
//! to the newly created log file once the time period has elapsed.
66
//!
@@ -38,7 +38,7 @@ use std::path::Path;
3838
/// It may be used with [`NonBlocking`][non-blocking] to perform writes without
3939
/// blocking the current thread.
4040
///
41-
/// [write]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
41+
/// [write]: std::io::Write
4242
/// [non-blocking]: super::non_blocking::NonBlocking
4343
///
4444
/// # Examples
@@ -57,7 +57,7 @@ impl RollingFileAppender {
5757
/// Creates a new `RollingFileAppender`.
5858
///
5959
/// A `RollingFileAppender` will have a fixed rotation whose frequency is
60-
/// defined by [`Rotation`](struct.Rotation.html). The `directory` and
60+
/// defined by [`Rotation`]. The `directory` and
6161
/// `file_name_prefix` arguments determine the location and file name's _prefix_
6262
/// of the log file. `RollingFileAppender` will automatically append the current date
6363
/// and hour (UTC format) to the file name.
@@ -180,7 +180,7 @@ pub fn hourly(
180180
/// a non-blocking, daily file appender.
181181
///
182182
/// A `RollingFileAppender` has a fixed rotation whose frequency is
183-
/// defined by [`Rotation`](struct.Rotation.html). The `directory` and
183+
/// defined by [`Rotation`]. The `directory` and
184184
/// `file_name_prefix` arguments determine the location and file name's _prefix_
185185
/// of the log file. `RollingFileAppender` automatically appends the current date in UTC.
186186
///

tracing-attributes/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ use syn::{
253253
///
254254
/// [span]: https://docs.rs/tracing/latest/tracing/span/index.html
255255
/// [`tracing`]: https://github.com/tokio-rs/tracing
256-
/// [`fmt::Debug`]: https://doc.rust-lang.org/std/fmt/trait.Debug.html
256+
/// [`fmt::Debug`]: std::fmt::Debug
257257
#[proc_macro_attribute]
258258
pub fn instrument(
259259
args: proc_macro::TokenStream,

tracing-core/src/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::{field, Metadata};
1717
/// associated with an event should be in the event's fields rather than in
1818
/// the textual message, as the fields are more structured.
1919
///
20-
/// [span]: ../span
21-
/// [fields]: ../field
20+
/// [span]: super::span
21+
/// [fields]: super::field
2222
#[derive(Debug)]
2323
pub struct Event<'a> {
2424
fields: &'a field::ValueSet<'a>,

tracing-core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
//! All other features of `tracing-core` should behave identically with and
9191
//! without `std` and `alloc`.
9292
//!
93-
//! [`libstd`]: https://doc.rust-lang.org/std/index.html
93+
//! [`libstd`]: std
9494
//! [`Dispatch::new`]: crate::dispatch::Dispatch::new
9595
//! [`Dispatch::from_static`]: crate::dispatch::Dispatch::from_static
9696
//! [`Dispatch::set_default`]: crate::dispatch::set_default
@@ -104,7 +104,7 @@
104104
//! * `std`: Depend on the Rust standard library (enabled by default).
105105
//! * `alloc`: Depend on [`liballoc`] (enabled by "std").
106106
//!
107-
//! [`liballoc`]: https://doc.rust-lang.org/alloc/index.html
107+
//! [`liballoc`]: alloc
108108
//!
109109
//! ## Supported Rust Versions
110110
//!

tracing-error/src/backtrace.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ use tracing::{Metadata, Span};
5353
/// Additionally, if custom formatting is desired, the [`with_spans`] method can
5454
/// be used to visit each span in the trace, formatting them in order.
5555
///
56-
/// [`tracing`]: https://docs.rs/tracing
57-
/// [`Backtrace`]: https://doc.rust-lang.org/std/backtrace/struct.Backtrace.html
56+
/// [`Backtrace`]: std::backtrace::Backtrace
5857
/// [span]: mod@tracing::span
5958
/// [parents]: mod@tracing::span#span-relationships
6059
/// [fields]: tracing::field
61-
/// [futures]: https://doc.rust-lang.org/std/future/trait.Future.html
60+
/// [futures]: std::future::Future
6261
/// [`tracing-futures`]: https://docs.rs/tracing-futures/
6362
/// [`with_spans`]: SpanTrace::with_spans()
6463
#[derive(Clone)]

tracing-error/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@
162162
//! [events]: tracing::Event
163163
//! [collector]: tracing::Collect
164164
//! [subscriber layer]: tracing_subscriber::subscribe::Subscribe
165-
//! [`tracing`]: https://docs.rs/tracing
166-
//! [`std::error::Error`]: https://doc.rust-lang.org/stable/std/error/trait.Error.html
167165
//!
168166
//! ## Supported Rust Versions
169167
//!

tracing-flame/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
//! the execution of your program. This representation is best created with a
9090
//! _flamechart_, which _does not_ sort or collapse identical stack frames.
9191
//!
92-
//! [`tracing`]: https://docs.rs/tracing
9392
//! [`inferno`]: https://docs.rs/inferno
9493
//! [`inferno-flamegraph`]: https://docs.rs/inferno/0.9.5/inferno/index.html#producing-a-flame-graph
9594
//!

tracing-log/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@
9292
//! [`tracing`]: https://crates.io/crates/tracing
9393
//! [`log`]: https://crates.io/crates/log
9494
//! [`env_logger` crate]: https://crates.io/crates/env-logger
95-
//! [`tracing::Collector`]: https://docs.rs/tracing/latest/tracing/trait.Collect.html
96-
//! [`Collect`]: https://docs.rs/tracing/latest/tracing/trait.Collect.html
97-
//! [`tracing::Event`]: https://docs.rs/tracing/latest/tracing/struct.Event.html
95+
//! [`tracing::Collector`]: tracing::Collect
96+
//! [`tracing::Event`]: tracing_core::Event
97+
//! [`Collect`]: tracing::Collect
9898
//! [flags]: https://docs.rs/tracing/latest/tracing/#crate-feature-flags
9999
#![doc(html_root_url = "https://docs.rs/tracing-log/0.1.1")]
100100
#![doc(
@@ -373,7 +373,7 @@ impl AsTrace for log::Level {
373373
/// to allow accessing its complete metadata in a consistent way,
374374
/// regardless of the source of its source.
375375
///
376-
/// [`normalized_metadata`]: trait.NormalizeEvent.html#normalized_metadata
376+
/// [`normalized_metadata`]: NormalizeEvent#normalized_metadata
377377
pub trait NormalizeEvent<'a>: crate::sealed::Sealed {
378378
/// If this `Event` comes from a `log`, this method provides a new
379379
/// normalized `Metadata` which has all available attributes

tracing-log/src/log_tracer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
//! such as when a crate emits both `tracing` diagnostics _and_ log records by
2020
//! default.
2121
//!
22-
//! [`log`]: https://docs.rs/log/0.4.8/log/
2322
//! [logger interface]: log::Log
2423
//! [`init`]: LogTracer.html#method.init
2524
//! [`init_with_filter`]: LogTracer.html#method.init_with_filter

tracing-serde/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! [![Documentation (master)][docs-master-badge]][docs-master-url]
77
//!
88
//! [docs-badge]: https://docs.rs/tracing-serde/badge.svg
9-
//! [docs-url]: https://docs.rs/tracing-serde
9+
//! [docs-url]: crate
1010
//! [docs-master-badge]: https://img.shields.io/badge/docs-master-blue
1111
//! [docs-master-url]: https://tracing-rs.netlify.com/tracing_serde
1212
//!

tracing-subscriber/src/fmt/fmt_subscriber.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub struct Subscriber<S, N = format::DefaultFields, E = format::Format, W = fn()
6767
}
6868

6969
impl<S> Subscriber<S> {
70-
/// Returns a new [`Subscriber`](struct.Subscriber.html) with the default configuration.
70+
/// Returns a new [`Subscriber`] with the default configuration.
7171
pub fn new() -> Self {
7272
Self::default()
7373
}
@@ -292,7 +292,7 @@ where
292292
/// Sets whether or not the [thread ID] of the current thread is displayed
293293
/// when formatting events
294294
///
295-
/// [thread ID]: https://doc.rust-lang.org/stable/std/thread/struct.ThreadId.html
295+
/// [thread ID]: std::thread::ThreadId
296296
pub fn with_thread_ids(
297297
self,
298298
display_thread_ids: bool,
@@ -309,7 +309,7 @@ where
309309
/// Sets whether or not the [name] of the current thread is displayed
310310
/// when formatting events
311311
///
312-
/// [name]: https://doc.rust-lang.org/stable/std/thread/index.html#naming-threads
312+
/// [name]: std::thread#naming-threads
313313
pub fn with_thread_names(
314314
self,
315315
display_thread_names: bool,
@@ -323,7 +323,7 @@ where
323323
}
324324
}
325325

326-
/// Sets the subscriber being built to use a [less verbose formatter](../fmt/format/struct.Compact.html).
326+
/// Sets the subscriber being built to use a [less verbose formatter](format::Compact).
327327
pub fn compact(self) -> Subscriber<S, N, format::Format<format::Compact, T>, W>
328328
where
329329
N: for<'writer> FormatFields<'writer> + 'static,
@@ -350,7 +350,7 @@ where
350350
}
351351
}
352352

353-
/// Sets the subscriber being built to use a [JSON formatter](../fmt/format/struct.Json.html).
353+
/// Sets the subscriber being built to use a [JSON formatter](format::Json).
354354
///
355355
/// The full format includes fields from all entered spans.
356356
///
@@ -383,7 +383,7 @@ where
383383
impl<S, T, W> Subscriber<S, format::JsonFields, format::Format<format::Json, T>, W> {
384384
/// Sets the JSON layer being built to flatten event metadata.
385385
///
386-
/// See [`format::Json`](../fmt/format/struct.Json.html)
386+
/// See [`format::Json`]
387387
pub fn flatten_event(
388388
self,
389389
flatten_event: bool,
@@ -400,7 +400,7 @@ impl<S, T, W> Subscriber<S, format::JsonFields, format::Format<format::Json, T>,
400400
/// Sets whether or not the formatter will include the current span in
401401
/// formatted events.
402402
///
403-
/// See [`format::Json`](../fmt/format/struct.Json.html)
403+
/// See [`format::Json`]
404404
pub fn with_current_span(
405405
self,
406406
display_current_span: bool,
@@ -417,7 +417,7 @@ impl<S, T, W> Subscriber<S, format::JsonFields, format::Format<format::Json, T>,
417417
/// Sets whether or not the formatter will include a list (from root to leaf)
418418
/// of all currently entered spans in formatted events.
419419
///
420-
/// See [`format::Json`](../fmt/format/struct.Json.html)
420+
/// See [`format::Json`]
421421
pub fn with_span_list(
422422
self,
423423
display_span_list: bool,

tracing-subscriber/src/fmt/format/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl<F, T> Format<F, T> {
325325
/// Sets whether or not the [thread ID] of the current thread is displayed
326326
/// when formatting events
327327
///
328-
/// [thread ID]: https://doc.rust-lang.org/stable/std/thread/struct.ThreadId.html
328+
/// [thread ID]: std::thread::ThreadId
329329
pub fn with_thread_ids(self, display_thread_id: bool) -> Format<F, T> {
330330
Format {
331331
display_thread_id,
@@ -336,7 +336,7 @@ impl<F, T> Format<F, T> {
336336
/// Sets whether or not the [name] of the current thread is displayed
337337
/// when formatting events
338338
///
339-
/// [name]: https://doc.rust-lang.org/stable/std/thread/index.html#naming-threads
339+
/// [name]: std::thread#naming-threads
340340
pub fn with_thread_names(self, display_thread_name: bool) -> Format<F, T> {
341341
Format {
342342
display_thread_name,
@@ -376,7 +376,7 @@ impl<T> Format<Json, T> {
376376
/// ```ignore,json
377377
/// {"timestamp":"Feb 20 11:28:15.096","level":"INFO","target":"mycrate", "message":"some message", "key": "value"}
378378
/// ```
379-
/// See [`Json`](../format/struct.Json.html).
379+
/// See [`Json`]
380380
#[cfg(feature = "json")]
381381
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
382382
pub fn flatten_event(mut self, flatten_event: bool) -> Format<Json, T> {
@@ -387,7 +387,7 @@ impl<T> Format<Json, T> {
387387
/// Sets whether or not the formatter will include the current span in
388388
/// formatted events.
389389
///
390-
/// See [`format::Json`](../fmt/format/struct.Json.html)
390+
/// See [`Json`]
391391
#[cfg(feature = "json")]
392392
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
393393
pub fn with_current_span(mut self, display_current_span: bool) -> Format<Json, T> {
@@ -398,7 +398,7 @@ impl<T> Format<Json, T> {
398398
/// Sets whether or not the formatter will include a list (from root to
399399
/// leaf) of all currently entered spans in formatted events.
400400
///
401-
/// See [`format::Json`](../fmt/format/struct.Json.html)
401+
/// See [`Json`]
402402
#[cfg(feature = "json")]
403403
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
404404
pub fn with_span_list(mut self, display_span_list: bool) -> Format<Json, T> {
@@ -971,7 +971,7 @@ impl<'a, F> fmt::Debug for FieldFnVisitor<'a, F> {
971971

972972
/// Configures what points in the span lifecycle are logged as events.
973973
///
974-
/// See also [`with_span_events`](../struct.SubscriberBuilder.html#method.with_span_events).
974+
/// See also [`with_span_events`](super::CollectorBuilder::with_span_events()).
975975
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd)]
976976
pub struct FmtSpan(FmtSpanInner);
977977

tracing-subscriber/src/fmt/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
//!
258258
//! ### Composing Subscribers
259259
//!
260-
//! Composing an [`EnvFilter`] `Subscribe` and a [format `Subscribe`](../fmt/struct.Subscriber.html):
260+
//! Composing an [`EnvFilter`] `Subscribe` and a [format `Subscribe`](super::fmt::Subscriber):
261261
//!
262262
//! ```rust
263263
//! use tracing_subscriber::{fmt, EnvFilter};
@@ -700,7 +700,7 @@ where
700700
/// Sets whether or not the [name] of the current thread is displayed
701701
/// when formatting events
702702
///
703-
/// [name]: https://doc.rust-lang.org/stable/std/thread/index.html#naming-threads
703+
/// [name]: std::thread#naming-threads
704704
pub fn with_thread_names(
705705
self,
706706
display_thread_names: bool,
@@ -714,7 +714,7 @@ where
714714
/// Sets whether or not the [thread ID] of the current thread is displayed
715715
/// when formatting events
716716
///
717-
/// [thread ID]: https://doc.rust-lang.org/stable/std/thread/struct.ThreadId.html
717+
/// [thread ID]: std::thread::ThreadId
718718
pub fn with_thread_ids(
719719
self,
720720
display_thread_ids: bool,
@@ -752,7 +752,7 @@ where
752752

753753
/// Sets the collector being built to use a JSON formatter.
754754
///
755-
/// See [`format::Json`](../fmt/format/struct.Json.html)
755+
/// See [`format::Json`](super::fmt::format::Json)
756756
#[cfg(feature = "json")]
757757
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
758758
pub fn json(self) -> CollectorBuilder<format::JsonFields, format::Format<format::Json, T>, F, W>
@@ -771,7 +771,7 @@ where
771771
impl<T, F, W> CollectorBuilder<format::JsonFields, format::Format<format::Json, T>, F, W> {
772772
/// Sets the json collector being built to flatten event metadata.
773773
///
774-
/// See [`format::Json`](../fmt/format/struct.Json.html)
774+
/// See [`format::Json`](super::fmt::format::Json)
775775
pub fn flatten_event(
776776
self,
777777
flatten_event: bool,
@@ -785,7 +785,7 @@ impl<T, F, W> CollectorBuilder<format::JsonFields, format::Format<format::Json,
785785
/// Sets whether or not the JSON subscriber being built will include the current span
786786
/// in formatted events.
787787
///
788-
/// See [`format::Json`](../fmt/format/struct.Json.html)
788+
/// See [`format::Json`](super::fmt::format::Json)
789789
pub fn with_current_span(
790790
self,
791791
display_current_span: bool,
@@ -799,7 +799,7 @@ impl<T, F, W> CollectorBuilder<format::JsonFields, format::Format<format::Json,
799799
/// Sets whether or not the JSON subscriber being built will include a list (from
800800
/// root to leaf) of all currently entered spans in formatted events.
801801
///
802-
/// See [`format::Json`](../fmt/format/struct.Json.html)
802+
/// See [`format::Json`](super::fmt::format::Json)
803803
pub fn with_span_list(
804804
self,
805805
display_span_list: bool,

0 commit comments

Comments
 (0)