diff --git a/tracing-subscriber/src/filter/env/directive.rs b/tracing-subscriber/src/filter/env/directive.rs index af5d60db47..1bd97cc42d 100644 --- a/tracing-subscriber/src/filter/env/directive.rs +++ b/tracing-subscriber/src/filter/env/directive.rs @@ -8,6 +8,7 @@ use tracing_core::{span, Level, Metadata}; /// A single filtering directive. // TODO(eliza): add a builder for programmatically constructing directives? #[derive(Debug, Eq, PartialEq)] +#[cfg_attr(docsrs, doc(cfg(feature = "env-filter")))] pub struct Directive { in_span: Option, fields: FilterVec, diff --git a/tracing-subscriber/src/filter/env/field.rs b/tracing-subscriber/src/filter/env/field.rs index d298cdedc1..ea6c197bd4 100644 --- a/tracing-subscriber/src/filter/env/field.rs +++ b/tracing-subscriber/src/filter/env/field.rs @@ -115,6 +115,7 @@ pub(crate) struct MatchPattern { /// Indicates that a field name specified in a filter directive was invalid. #[derive(Clone, Debug)] +#[cfg_attr(docsrs, doc(cfg(feature = "env-filter")))] pub struct BadName { name: String, } diff --git a/tracing-subscriber/src/filter/env/mod.rs b/tracing-subscriber/src/filter/env/mod.rs index bf78f9d8c0..f983418059 100644 --- a/tracing-subscriber/src/filter/env/mod.rs +++ b/tracing-subscriber/src/filter/env/mod.rs @@ -118,6 +118,7 @@ type FilterVec = Vec; /// Indicates that an error occurred while parsing a `EnvFilter` from an /// environment variable. +#[cfg_attr(docsrs, doc(cfg(feature = "env-filter")))] #[derive(Debug)] pub struct FromEnvError { kind: ErrorKind,