What changed, and why it matters
This commit removes a Rust compiler feature flag called doc_auto_cfg from 11 library files. The feature was removed in recent nightly Rust compilers and was causing documentation builds to fail when publishing crates. It is purely a build/documentation compatibility fix with no effect on the actual Bitcoin code or its security.
No security action required. Treat as a routine build/maintenance fix. Ensure docs.rs builds pass after this change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes #![cfg_attr(docsrs, feature(doc_auto_cfg))] directives from the lib.rs files of multiple workspace crates. doc_auto_cfg is an unstable Rust docs.rs feature that automatically annotates items with their required feature gates. Because the feature was recently removed from nightly Rust, its presence broke documentation builds during crate publishing. The change only affects docs.rs builds and does not alter runtime behavior, API surface, or any cryptographic/consensus logic.
Changed components
addresses/src/lib.rsbase58/src/lib.rsbitcoin/src/lib.rschacha20_poly1305/src/lib.rsconsensus_encoding/src/lib.rshashes/src/lib.rsinternals/src/lib.rsio/src/lib.rsp2p/src/lib.rsprimitives/src/lib.rsunits/src/lib.rsInspect captured patch +0 / −19
diff --git a/addresses/src/lib.rs b/addresses/src/lib.rs
index 3a4d091b..74884fd4 100644
--- a/addresses/src/lib.rs
+++ b/addresses/src/lib.rs
@@ -13,7 +13,6 @@
#![cfg(feature = "alloc")]
#![no_std]
// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(test(attr(warn(unused))))]
// Coding conventions.
#![warn(deprecated_in_future)]
diff --git a/base58/src/lib.rs b/base58/src/lib.rs
index 4db48132..d474dd64 100644
--- a/base58/src/lib.rs
+++ b/base58/src/lib.rs
@@ -8,7 +8,6 @@
#![cfg(feature = "alloc")]
#![no_std]
// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(bench, feature(test))]
// Coding conventions.
#![warn(missing_docs)]
diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs
index 20f75a01..5a95be55 100644
--- a/bitcoin/src/lib.rs
+++ b/bitcoin/src/lib.rs
@@ -25,7 +25,6 @@
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_notable_trait))]
// Coding conventions.
#![warn(missing_docs)]
diff --git a/chacha20_poly1305/src/lib.rs b/chacha20_poly1305/src/lib.rs
index 02f05ccb..cb887a36 100644
--- a/chacha20_poly1305/src/lib.rs
+++ b/chacha20_poly1305/src/lib.rs
@@ -6,8 +6,6 @@
//! to form an authenticated encryption with additional data (AEAD) algorithm.
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/consensus_encoding/src/lib.rs b/consensus_encoding/src/lib.rs
index 7a500053..19168202 100644
--- a/consensus_encoding/src/lib.rs
+++ b/consensus_encoding/src/lib.rs
@@ -7,8 +7,6 @@
//!
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs
index a387f482..7f91f857 100644
--- a/hashes/src/lib.rs
+++ b/hashes/src/lib.rs
@@ -51,8 +51,6 @@
//! ```
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/internals/src/lib.rs b/internals/src/lib.rs
index e8a8a14b..b7cc74fb 100644
--- a/internals/src/lib.rs
+++ b/internals/src/lib.rs
@@ -6,8 +6,6 @@
//! [rust-bitcoin](https://github.com/rust-bitcoin) ecosystem.
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/io/src/lib.rs b/io/src/lib.rs
index bc0a4203..15ecdb00 100644
--- a/io/src/lib.rs
+++ b/io/src/lib.rs
@@ -14,8 +14,6 @@
//! `github.com/rust-bitcoin/rust-bitcoin/bitcoin/examples/` directory.
#![cfg_attr(not(feature = "std"), no_std)]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![doc(test(attr(warn(unused))))]
diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs
index c839e3ab..16e24050 100644
--- a/p2p/src/lib.rs
+++ b/p2p/src/lib.rs
@@ -3,8 +3,6 @@
//! Rust Bitcoin Peer to Peer Message Types
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs
index 325ea5f4..6c351342 100644
--- a/primitives/src/lib.rs
+++ b/primitives/src/lib.rs
@@ -13,8 +13,6 @@
//! [`rust-bitcoin`]: <https://github.com/rust-bitcoin>
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
diff --git a/units/src/lib.rs b/units/src/lib.rs
index e191c8d8..b09d5b78 100644
--- a/units/src/lib.rs
+++ b/units/src/lib.rs
@@ -19,8 +19,6 @@
//! ```
#![no_std]
-// Experimental features we need.
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// Coding conventions.
#![warn(missing_docs)]
#![warn(deprecated_in_future)]
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.