From 97385db79d123bececca9051af46024795ddb99d Mon Sep 17 00:00:00 2001 From: Rasmus Rendal Date: Thu, 25 Jun 2026 09:26:28 +0200 Subject: [PATCH] fix: Use doc_cfg instead of doc_auto_cfg doc_auto_cfg was removed in rust 1.92.0, and is currently stopping from docs.rs from building (https://docs.rs/crate/rust-telemetry/1.3.0). Using doc_cfg we get the same feature as doc_auto_cfg used to give us. Also, hide this behind the `docsrs` configuration option, to stop absolutely depending on nightly features when building docs. This commit will not cause docsrs to build rust-telemetry successfully. For this to work, we must update our dependencies (mostly transitive dependencies of OTEL, see #26) to newer versions that do not use `doc_auto_cfg` either. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f2d1a45..6279879 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! //! Lib containing the definitions and initializations of the OpenTelemetry //! tools -#![cfg_attr(all(doc, not(doctest)), feature(doc_auto_cfg))] +#![cfg_attr(all(doc, not(doctest), docsrs), feature(doc_cfg))] use std::{collections::BTreeMap as Map, str::FromStr as _}; use config::{OtelConfig, OtelUrl, StdoutLogsConfig};