From 4f6bddc414ce1ccecde6a989d66371f495033af0 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 15:14:48 +0900 Subject: [PATCH 01/15] add `deny(broken_intra_doc_links)` --- tracing-core/src/lib.rs | 2 +- tracing-error/src/lib.rs | 2 +- tracing-futures/src/lib.rs | 2 +- tracing-log/src/lib.rs | 2 +- tracing-subscriber/src/lib.rs | 2 +- tracing-tower/src/lib.rs | 2 +- tracing/src/lib.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tracing-core/src/lib.rs b/tracing-core/src/lib.rs index 49ba35ea91..bba9987605 100644 --- a/tracing-core/src/lib.rs +++ b/tracing-core/src/lib.rs @@ -91,7 +91,7 @@ issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-error/src/lib.rs b/tracing-error/src/lib.rs index 21c5f4b1aa..05f367430c 100644 --- a/tracing-error/src/lib.rs +++ b/tracing-error/src/lib.rs @@ -185,7 +185,7 @@ //! supported compiler version is not considered a semver breaking change as //! long as doing so complies with this policy. //! -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![doc(html_root_url = "https://docs.rs/tracing-error/0.1.2")] #![doc( html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", diff --git a/tracing-futures/src/lib.rs b/tracing-futures/src/lib.rs index 262f3b64e9..9dc1afb4b1 100644 --- a/tracing-futures/src/lib.rs +++ b/tracing-futures/src/lib.rs @@ -101,7 +101,7 @@ while_true )] #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #[cfg(feature = "std-future")] use pin_project::pin_project; diff --git a/tracing-log/src/lib.rs b/tracing-log/src/lib.rs index ce97845de3..c4cf239dcc 100644 --- a/tracing-log/src/lib.rs +++ b/tracing-log/src/lib.rs @@ -110,7 +110,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-subscriber/src/lib.rs b/tracing-subscriber/src/lib.rs index bbea61b5c9..0622696852 100644 --- a/tracing-subscriber/src/lib.rs +++ b/tracing-subscriber/src/lib.rs @@ -72,7 +72,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-tower/src/lib.rs b/tracing-tower/src/lib.rs index 1c81615f3f..d3975fceb0 100644 --- a/tracing-tower/src/lib.rs +++ b/tracing-tower/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![doc( html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 22688d7893..26a61277a5 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -844,7 +844,7 @@ //! [instrument]: https://docs.rs/tracing-attributes/latest/tracing_attributes/attr.instrument.html //! [flags]: #crate-feature-flags #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))] #![doc(html_root_url = "https://docs.rs/tracing/0.1.20")] #![doc( html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", From 9ac519570b754e6a716b2e5e5723186a318372e2 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 16:07:36 +0900 Subject: [PATCH 02/15] add `deny(broken_intra_doc_links)` to other crates --- tracing-appender/src/lib.rs | 1 + tracing-attributes/src/lib.rs | 1 + tracing-flame/src/lib.rs | 1 + tracing-journald/src/lib.rs | 1 + tracing-macros/src/lib.rs | 2 ++ tracing-opentelemetry/src/lib.rs | 1 + tracing-serde/src/lib.rs | 1 + 7 files changed, 8 insertions(+) diff --git a/tracing-appender/src/lib.rs b/tracing-appender/src/lib.rs index 5b6fbf8ae4..2cf050648e 100644 --- a/tracing-appender/src/lib.rs +++ b/tracing-appender/src/lib.rs @@ -127,6 +127,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-attributes/src/lib.rs b/tracing-attributes/src/lib.rs index 58698a7723..c674095d3b 100644 --- a/tracing-attributes/src/lib.rs +++ b/tracing-attributes/src/lib.rs @@ -57,6 +57,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-flame/src/lib.rs b/tracing-flame/src/lib.rs index 5605c2cd60..afeba005d1 100644 --- a/tracing-flame/src/lib.rs +++ b/tracing-flame/src/lib.rs @@ -113,6 +113,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, missing_docs, diff --git a/tracing-journald/src/lib.rs b/tracing-journald/src/lib.rs index 27ba6721a5..d296b6e27a 100644 --- a/tracing-journald/src/lib.rs +++ b/tracing-journald/src/lib.rs @@ -36,6 +36,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #[cfg(unix)] use std::os::unix::net::UnixDatagram; use std::{fmt, io, io::Write}; diff --git a/tracing-macros/src/lib.rs b/tracing-macros/src/lib.rs index 7643f1d831..3a3ccc854f 100644 --- a/tracing-macros/src/lib.rs +++ b/tracing-macros/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] + /// Alias of `dbg!` for avoiding conflicts with the `std::dbg!` macro. #[macro_export] macro_rules! trace_dbg { diff --git a/tracing-opentelemetry/src/lib.rs b/tracing-opentelemetry/src/lib.rs index 6fdd43dfbd..b515d66a9a 100644 --- a/tracing-opentelemetry/src/lib.rs +++ b/tracing-opentelemetry/src/lib.rs @@ -95,6 +95,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] /// Implementation of the trace::Layer as a source of OpenTelemetry data. mod layer; diff --git a/tracing-serde/src/lib.rs b/tracing-serde/src/lib.rs index 9307aa74b4..d98e28b459 100644 --- a/tracing-serde/src/lib.rs +++ b/tracing-serde/src/lib.rs @@ -130,6 +130,7 @@ html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/" )] +#![cfg_attr(docsrs, deny(broken_intra_doc_links))] #![warn( missing_debug_implementations, // missing_docs, // TODO: add documentation From 4e110970e74a9fb44b8ad7c0c4922bc3a8f07e77 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 18:13:56 +0900 Subject: [PATCH 03/15] fix spans and events link --- tracing/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 26a61277a5..4fc4b59e41 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -636,7 +636,7 @@ //! ### Emitting `log` Records //! //! This crate provides two feature flags, "log" and "log-always", which will -//! cause [spans] and [events] to emit `log` records. When the "log" feature is +//! cause [spans][span] and [events][event] to emit `log` records. When the "log" feature is //! enabled, if no `tracing` `Subscriber` is active, invoking an event macro or //! creating a span with fields will emit a `log` record. This is intended //! primarily for use in libraries which wish to emit diagnostics that can be @@ -671,7 +671,7 @@ //! //! The [`tracing-log`] crate provides a compatibility layer which //! allows a `tracing` [`Subscriber`] to consume `log` records as though they -//! were `tracing` [events]. This allows applications using `tracing` to record +//! were `tracing` [events][event]. This allows applications using `tracing` to record //! the logs emitted by dependencies using `log` as events within the context of //! the application's trace tree. See [that crate's documentation][log-tracer] //! for details. From 542f43140a0bc26e91037bf3ba2bc14aadcbdff3 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 18:18:07 +0900 Subject: [PATCH 04/15] fix rotation links --- tracing-appender/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-appender/src/lib.rs b/tracing-appender/src/lib.rs index 2cf050648e..cd3ea6110e 100644 --- a/tracing-appender/src/lib.rs +++ b/tracing-appender/src/lib.rs @@ -34,7 +34,7 @@ //! # } //! ``` //! This creates an hourly rotating file appender that writes to `/some/directory/prefix.log.YYYY-MM-DD-HH`. -//! [`Rotation::DAILY`] and [`Rotation::NEVER`] are the other available options. +//! [`Rotation::DAILY`](rolling::Rotation::DAILY) and [`Rotation::NEVER`](rolling::Rotation::NEVER) are the other available options. //! //! The file appender implements [`std::io::Write`][write]. To be used with [`tracing_subscriber::FmtSubscriber`][fmt_subscriber], //! it must be combined with a [`MakeWriter`][make_writer] implementation to be able to record tracing spans/event. From d2bd00186679ed2a4363b09e1a9b9dbe4871cc18 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 18:19:03 +0900 Subject: [PATCH 05/15] fix a private struct link --- tracing-core/src/callsite.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing-core/src/callsite.rs b/tracing-core/src/callsite.rs index f6904befda..7d260fd28c 100644 --- a/tracing-core/src/callsite.rs +++ b/tracing-core/src/callsite.rs @@ -72,7 +72,7 @@ impl Registry { /// Trait implemented by callsites. /// -/// These functions are only intended to be called by the [`Registry`] which +/// These functions are only intended to be called by the `Registry` which /// correctly handles determining the common interest between all subscribers. pub trait Callsite: Sync { /// Sets the [`Interest`] for this callsite. @@ -114,7 +114,7 @@ pub struct Identifier( /// [`enabled`] is evaluated for every event. /// /// This function will also re-compute the global maximum level as determined by -/// the [`Subscriber::max_level_hint`] method. If a [`Subscriber`] +/// the [`Subscriber::max_level_hint`](crate::Subscriber::max_level_hint) method. If a [`Subscriber`] /// implementation changes the value returned by its `max_level_hint` /// implementation at runtime, then it **must** call this function after that /// value changes, in order for the change to be reflected. From 4b60c4d7f2a5d91f4810a2b66294798a01e40d3a Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 18:20:16 +0900 Subject: [PATCH 06/15] fix a tracing link --- tracing-journald/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-journald/src/lib.rs b/tracing-journald/src/lib.rs index d296b6e27a..f9ddee668d 100644 --- a/tracing-journald/src/lib.rs +++ b/tracing-journald/src/lib.rs @@ -1,6 +1,6 @@ //! # tracing-journald //! -//! Support for logging [`tracing`][tracing] events natively to [journald], +//! Support for logging [`tracing`] events natively to [journald], //! preserving structured information. //! //! ## Overview From a5a9fbd12832c5c766e210a4b6cce3707360b891 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Mon, 21 Sep 2020 18:40:58 +0900 Subject: [PATCH 07/15] fix a try_init link --- tracing-subscriber/src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-subscriber/src/util.rs b/tracing-subscriber/src/util.rs index 4d40bbf320..f6d95c3714 100644 --- a/tracing-subscriber/src/util.rs +++ b/tracing-subscriber/src/util.rs @@ -79,7 +79,7 @@ where impl SubscriberInitExt for T where T: Into {} -/// Error returned by [`try_init`] if a global default subscriber could not be initialized. +/// Error returned by [`try_init`](SubscriberInitExt::try_init) if a global default subscriber could not be initialized. pub struct TryInitError { inner: Box, } From 66a84e88a434770ee027f6c1b4f07676026d9824 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda <41065217+TaKO8Ki@users.noreply.github.com> Date: Tue, 22 Sep 2020 01:48:21 +0900 Subject: [PATCH 08/15] Update tracing-core/src/callsite.rs Co-authored-by: Eliza Weisman --- tracing-core/src/callsite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-core/src/callsite.rs b/tracing-core/src/callsite.rs index 7d260fd28c..ad2b30a432 100644 --- a/tracing-core/src/callsite.rs +++ b/tracing-core/src/callsite.rs @@ -72,7 +72,7 @@ impl Registry { /// Trait implemented by callsites. /// -/// These functions are only intended to be called by the `Registry` which +/// These functions are only intended to be called by the callsite registry, which /// correctly handles determining the common interest between all subscribers. pub trait Callsite: Sync { /// Sets the [`Interest`] for this callsite. From 1766a9e3a877481b0d2ccb3fc70f0ec2d18676a6 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Sep 2020 02:26:35 +0900 Subject: [PATCH 09/15] add `Building Documentation` subsection --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 181b3e8474..064d80c5b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,6 +211,14 @@ To reduce the effort required to review documentation-related changes, be viewed by clicking the `details` link on the `netlify/tracing-rs/deploy-preview check` on all pull requests. +### Building Documentation + +If you want to build docs locally, you should do like this. + +```bash +RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps +``` + ### Commits It is a recommended best practice to keep your changes as logically grouped as From ead12cf31fd44a2336b1746955d0cd4da43b271c Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Sep 2020 03:05:53 +0900 Subject: [PATCH 10/15] put a link reference --- tracing-core/src/callsite.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tracing-core/src/callsite.rs b/tracing-core/src/callsite.rs index ad2b30a432..5e48473e15 100644 --- a/tracing-core/src/callsite.rs +++ b/tracing-core/src/callsite.rs @@ -114,11 +114,12 @@ pub struct Identifier( /// [`enabled`] is evaluated for every event. /// /// This function will also re-compute the global maximum level as determined by -/// the [`Subscriber::max_level_hint`](crate::Subscriber::max_level_hint) method. If a [`Subscriber`] +/// the [`max_level_hint`] method. If a [`Subscriber`] /// implementation changes the value returned by its `max_level_hint` /// implementation at runtime, then it **must** call this function after that /// value changes, in order for the change to be reflected. /// +/// [`max_level_hint`]: ../subscriber/trait.Subscriber.html#method.max_level_hint /// [`Callsite`]: ../callsite/trait.Callsite.html /// [`enabled`]: ../subscriber/trait.Subscriber.html#tymethod.enabled /// [`Interest::sometimes()`]: ../subscriber/struct.Interest.html#method.sometimes From 8b902f43e8539117da3face0b720d490df176f58 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Sep 2020 13:16:04 +0900 Subject: [PATCH 11/15] wrap spans and events --- tracing/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 4fc4b59e41..d32c3ca7f2 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -30,7 +30,7 @@ //! ## Spans //! //! To record the flow of execution through a program, `tracing` introduces the -//! concept of [spans][span]. Unlike a log line that represents a _moment in +//! concept of [spans]. Unlike a log line that represents a _moment in //! time_, a span represents a _period of time_ with a beginning and an end. When a //! program begins executing in a context or performing a unit of work, it //! _enters_ that context's span, and when it stops executing in that context, @@ -636,7 +636,7 @@ //! ### Emitting `log` Records //! //! This crate provides two feature flags, "log" and "log-always", which will -//! cause [spans][span] and [events][event] to emit `log` records. When the "log" feature is +//! cause [spans] and [events] to emit `log` records. When the "log" feature is //! enabled, if no `tracing` `Subscriber` is active, invoking an event macro or //! creating a span with fields will emit a `log` record. This is intended //! primarily for use in libraries which wish to emit diagnostics that can be @@ -671,7 +671,7 @@ //! //! The [`tracing-log`] crate provides a compatibility layer which //! allows a `tracing` [`Subscriber`] to consume `log` records as though they -//! were `tracing` [events][event]. This allows applications using `tracing` to record +//! were `tracing` [events]. This allows applications using `tracing` to record //! the logs emitted by dependencies using `log` as events within the context of //! the application's trace tree. See [that crate's documentation][log-tracer] //! for details. @@ -818,10 +818,12 @@ //! //! [`log`]: https://docs.rs/log/0.4.6/log/ //! [span]: span/index.html +//! [spans]: span/index.html //! [`Span`]: span/struct.Span.html //! [`in_scope`]: span/struct.Span.html#method.in_scope //! [`Event`]: struct.Event.html //! [event]: struct.Event.html +//! [events]: struct.Event.html //! [`Subscriber`]: subscriber/trait.Subscriber.html //! [Subscriber::event]: subscriber/trait.Subscriber.html#tymethod.event //! [`enter`]: subscriber/trait.Subscriber.html#tymethod.enter From 6b112a36cd9f55bfd47cbd449bea8786e77cb8fa Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Sep 2020 13:36:42 +0900 Subject: [PATCH 12/15] fix building documentation --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 064d80c5b4..86856fa449 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -213,7 +213,8 @@ be viewed by clicking the `details` link on the ### Building Documentation -If you want to build docs locally, you should do like this. +Since we use nightly-only features and lints like `doc(cfg)` and `broken_intra_doc_lints`, +you should do like this to build docs locally. ```bash RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps From 56d0753d10be2cf32e89cb12103953329ebb3b5e Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Sep 2020 14:12:11 +0900 Subject: [PATCH 13/15] use intra-doc links --- tracing/src/lib.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index d32c3ca7f2..3c280efeea 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -817,23 +817,23 @@ //! long as doing so complies with this policy. //! //! [`log`]: https://docs.rs/log/0.4.6/log/ -//! [span]: span/index.html -//! [spans]: span/index.html -//! [`Span`]: span/struct.Span.html -//! [`in_scope`]: span/struct.Span.html#method.in_scope -//! [`Event`]: struct.Event.html -//! [event]: struct.Event.html -//! [events]: struct.Event.html -//! [`Subscriber`]: subscriber/trait.Subscriber.html -//! [Subscriber::event]: subscriber/trait.Subscriber.html#tymethod.event -//! [`enter`]: subscriber/trait.Subscriber.html#tymethod.enter -//! [`exit`]: subscriber/trait.Subscriber.html#tymethod.exit -//! [`enabled`]: subscriber/trait.Subscriber.html#tymethod.enabled -//! [metadata]: struct.Metadata.html -//! [`field::display`]: field/fn.display.html -//! [`field::debug`]: field/fn.debug.html -//! [`set_global_default`]: subscriber/fn.set_global_default.html -//! [`with_default`]: subscriber/fn.with_default.html +//! [span]: mod@span +//! [spans]: mod@span +//! [`Span`]: span::Span +//! [`in_scope`]: span::Span::in_scope +//! [`Event`]: Event +//! [event]: Event +//! [events]: Event +//! [`Subscriber`]: subscriber::Subscriber +//! [Subscriber::event]: subscriber::Subscriber::event +//! [`enter`]: subscriber::Subscriber::enter +//! [`exit`]: subscriber::Subscriber::exit +//! [`enabled`]: subscriber::Subscriber::enabled +//! [metadata]: Metadata +//! [`field::display`]: field::display +//! [`field::debug`]: field::debug +//! [`set_global_default`]: subscriber::set_global_default +//! [`with_default`]: subscriber::with_default //! [`tokio-rs/tracing`]: https://github.com/tokio-rs/tracing //! [`tracing-futures`]: https://crates.io/crates/tracing-futures //! [`tracing-subscriber`]: https://crates.io/crates/tracing-subscriber From 6d0ee284909a315eca39effebc0f94659afdcaac Mon Sep 17 00:00:00 2001 From: Takayuki Maeda <41065217+TaKO8Ki@users.noreply.github.com> Date: Tue, 22 Sep 2020 14:56:26 +0900 Subject: [PATCH 14/15] Update tracing/src/lib.rs Co-authored-by: Joshua Nelson --- tracing/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 3c280efeea..6ae17e085a 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -821,7 +821,6 @@ //! [spans]: mod@span //! [`Span`]: span::Span //! [`in_scope`]: span::Span::in_scope -//! [`Event`]: Event //! [event]: Event //! [events]: Event //! [`Subscriber`]: subscriber::Subscriber From 1f54df464dead2f1bb9171a6a8c1ea7031cef87f Mon Sep 17 00:00:00 2001 From: Takayuki Maeda <41065217+TaKO8Ki@users.noreply.github.com> Date: Wed, 23 Sep 2020 11:36:27 +0900 Subject: [PATCH 15/15] Update CONTRIBUTING.md Co-authored-by: Eliza Weisman --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86856fa449..e9254458ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -213,8 +213,11 @@ be viewed by clicking the `details` link on the ### Building Documentation -Since we use nightly-only features and lints like `doc(cfg)` and `broken_intra_doc_lints`, -you should do like this to build docs locally. +Tracing's documentation uses nightly-only RustDoc features and lints, like +`doc(cfg)` and `broken_intra_doc_lints`. These features are enabled by +passing `--cfg docsrs` to RustDoc. Therefore, in order to build Tracing's +documentation the same way it would be built by docs.rs, it's necessary to +use the following command: ```bash RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps