* Implement PartialOrd for MatchPattern, MatchDebug in terms of Ord
* Fix missing link to supported regex syntax
* Update expected trybuild output
* Fix tracing_subscriber::Layer links
This commit is contained in:
Jonas Platte 2025-08-15 07:40:42 +02:00 committed by GitHub
parent e63ef57f3d
commit 3a1f571102
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 14 deletions

View File

@ -33,20 +33,14 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
16 | | }
| | ^
| | |
| |_`(&str,)` cannot be formatted with the default formatter
| |_the trait `std::fmt::Display` is not implemented for `(&str,)`
| return type was inferred to be `(&str,)` here
|
= help: the trait `std::fmt::Display` is not implemented for `(&str,)`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
--> tests/ui/fail/async_instrument.rs:14:34
|
14 | async fn opaque_unsatisfied() -> impl std::fmt::Display {
| ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `(&str,)`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `(&str,)`
error[E0308]: mismatched types
--> tests/ui/fail/async_instrument.rs:22:5

View File

@ -24,7 +24,7 @@ preserving structured information.
[`tracing`] is a framework for instrumenting Rust programs to collect
scoped, structured, and async-aware diagnostics. `tracing-journald` provides a
[`tracing-subscriber::Layer`][layer] implementation for logging `tracing` spans
[`tracing_subscriber::Layer`][layer] implementation for logging `tracing` spans
and events to [`systemd-journald`][journald], on Linux distributions that use
`systemd`.

View File

@ -7,7 +7,7 @@
//!
//! [`tracing`] is a framework for instrumenting Rust programs to collect
//! scoped, structured, and async-aware diagnostics. `tracing-journald` provides a
//! [`tracing-subscriber::Layer`] implementation for logging `tracing` spans
//! [`tracing_subscriber::Layer`] implementation for logging `tracing` spans
//! and events to [`systemd-journald`][journald], on Linux distributions that
//! use `systemd`.
//!

View File

@ -334,7 +334,7 @@ impl Eq for MatchPattern {}
impl PartialOrd for MatchPattern {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.pattern.cmp(&other.pattern))
Some(self.cmp(other))
}
}
@ -430,7 +430,7 @@ impl Eq for MatchDebug {}
impl PartialOrd for MatchDebug {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.pattern.cmp(&other.pattern))
Some(self.cmp(other))
}
}

View File

@ -78,8 +78,7 @@ use tracing_core::{
/// instead.
///
/// When field value filters are interpreted as regular expressions, the
/// [`regex-automata` crate's regular expression syntax][re-syntax] is
/// supported.
/// [`regex` crate's regular expression syntax][re-syntax] is supported.
///
/// **Note**: When filters are constructed from potentially untrusted inputs,
/// [disabling regular expression matching](Builder::with_regex) is strongly
@ -192,6 +191,7 @@ use tracing_core::{
/// [global]: crate::layer#global-filtering
/// [plf]: crate::layer#per-layer-filtering
/// [filtering]: crate::layer#filtering-with-layers
/// [re-syntax]: https://docs.rs/regex/1.11.1/regex/#syntax
#[cfg_attr(docsrs, doc(cfg(all(feature = "env-filter", feature = "std"))))]
#[derive(Debug)]
pub struct EnvFilter {