diff --git a/tracing-subscriber/src/filter/env/directive.rs b/tracing-subscriber/src/filter/env/directive.rs index 1f0b118661..4a69d6398f 100644 --- a/tracing-subscriber/src/filter/env/directive.rs +++ b/tracing-subscriber/src/filter/env/directive.rs @@ -161,7 +161,9 @@ impl Directive { .unwrap() }); - let caps = DIRECTIVE_RE.captures(from).ok_or_else(ParseError::new)?; + let caps = DIRECTIVE_RE + .captures(from) + .ok_or_else(DirectiveParseError::new)?; if let Some(level) = caps .name("global_level") diff --git a/tracing-subscriber/src/filter/env/mod.rs b/tracing-subscriber/src/filter/env/mod.rs index 4819e7936b..c546aacc9a 100644 --- a/tracing-subscriber/src/filter/env/mod.rs +++ b/tracing-subscriber/src/filter/env/mod.rs @@ -216,7 +216,7 @@ pub struct FromEnvError { #[derive(Debug)] enum ErrorKind { - Parse(ParseError), + Parse(DirectiveParseError), Env(env::VarError), } diff --git a/tracing-subscriber/src/filter/mod.rs b/tracing-subscriber/src/filter/mod.rs index bb0b5af5f1..44e83269fe 100644 --- a/tracing-subscriber/src/filter/mod.rs +++ b/tracing-subscriber/src/filter/mod.rs @@ -10,6 +10,7 @@ //! [`Subscribe`]: crate::subscribe mod filter_fn; mod level; +mod targets; feature! { #![all(feature = "env-filter", feature = "std")] diff --git a/tracing-subscriber/src/layer/mod.rs b/tracing-subscriber/src/layer/mod.rs index 7290d65847..bbd1756815 100644 --- a/tracing-subscriber/src/layer/mod.rs +++ b/tracing-subscriber/src/layer/mod.rs @@ -427,6 +427,7 @@ pub(crate) mod tests; /// [module-level documentation](crate::layer) for details. /// /// [`Subscriber`]: tracing_core::Subscriber +#[cfg_attr(docsrs, doc(notable_trait))] pub trait Layer where S: Subscriber, @@ -784,7 +785,8 @@ where /// A per-[`Layer`] filter that determines whether a span or event is enabled /// for an individual layer. #[cfg(feature = "registry")] -#[cfg_attr(docsrs, doc(cfg(feature = "registry"), notable_trait))] +#[cfg_attr(docsrs, doc(cfg(feature = "registry")))] +#[cfg_attr(docsrs, doc(notable_trait))] pub trait Filter { /// Returns `true` if this layer is interested in a span or event with the /// given [`Metadata`] in the current [`Context`], similarly to