Skip to content

Commit c400b75

Browse files
authored
chore: fix Rust 1.85.0 lints and errors (#3240)
We had some broken link formatting in the `tracing-journald` docs which clippy picked up (the text looked like a link definition, but wasn't meant to be). The incorrect links have now been corrected. They have to link to the `tracing-core` crate because `tracing-journald` doesn't depend on `tracing` directly. Fixes for a broken link in the `tracing-subscriber` main page and correcting the link to `Collect` from `tracing-log` (which also doesn't depend on `tracing` directly) were also included.
1 parent b486867 commit c400b75

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

tracing-journald/src/lib.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,17 @@ pub struct PriorityMappings {
517517
impl PriorityMappings {
518518
/// Returns the default priority mappings:
519519
///
520-
/// - [`tracing::Level::ERROR`]: [`Priority::Error`] (3)
521-
/// - [`tracing::Level::WARN`]: [`Priority::Warning`] (4)
522-
/// - [`tracing::Level::INFO`]: [`Priority::Notice`] (5)
523-
/// - [`tracing::Level::DEBUG`]: [`Priority::Informational`] (6)
524-
/// - [`tracing::Level::TRACE`]: [`Priority::Debug`] (7)
520+
/// - [`tracing::Level::ERROR`][]: [`Priority::Error`] (3)
521+
/// - [`tracing::Level::WARN`][]: [`Priority::Warning`] (4)
522+
/// - [`tracing::Level::INFO`][]: [`Priority::Notice`] (5)
523+
/// - [`tracing::Level::DEBUG`][]: [`Priority::Informational`] (6)
524+
/// - [`tracing::Level::TRACE`][]: [`Priority::Debug`] (7)
525+
///
526+
/// [`tracing::Level::ERROR`]: tracing_core::Level::ERROR
527+
/// [`tracing::Level::WARN`]: tracing_core::Level::WARN
528+
/// [`tracing::Level::INFO`]: tracing_core::Level::INFO
529+
/// [`tracing::Level::DEBUG`]: tracing_core::Level::DEBUG
530+
/// [`tracing::Level::TRACE`]: tracing_core::Level::TRACE
525531
pub fn new() -> PriorityMappings {
526532
Self {
527533
error: Priority::Error,

tracing-log/src/lib.rs

Lines changed: 2 additions & 2 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`]: tracing::Collect
95+
//! [`tracing::Collector`]: tracing_core::Collect
9696
//! [`tracing::Event`]: tracing_core::Event
97-
//! [`Collect`]: tracing::Collect
97+
//! [`Collect`]: tracing_core::Collect
9898
//! [flags]: https://docs.rs/tracing/latest/tracing/#crate-feature-flags
9999
#![doc(
100100
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png",

tracing-subscriber/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
//! [`Collect`]: tracing_core::collect::Collect
123123
//! [collector]: tracing_core::collect::Collect
124124
//! [`EnvFilter`]: filter::EnvFilter
125+
//! [`tracing`]: https://crates.io/crates/tracing
125126
//! [`tracing-log`]: https://crates.io/crates/tracing-log
126127
//! [`smallvec`]: https://crates.io/crates/smallvec
127128
//! [`env_logger` crate]: https://crates.io/crates/env_logger

tracing/src/collect.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ where
3030
///
3131
/// Note: Libraries should *NOT* call `set_global_default()`! That will cause conflicts when
3232
/// executables try to set them later.
33-
///
34-
/// [span]: super::span
3533
#[cfg(feature = "alloc")]
3634
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
3735
pub fn set_global_default<C>(collector: C) -> Result<(), SetGlobalDefaultError>

0 commit comments

Comments
 (0)