Skip to content

Commit 4cbd428

Browse files
authored
chore: Replace doc_auto_cfg with doc_cfg (#1664)
- [ ] Added a `CHANGELOG.md` entry # Summary Replace the removed `doc_auto_cfg` feature with the `doc_cfg` feature. # Motivation Avoid compilation errors when building documentation. # Details `doc_auto_cfg` was merged into `doc_cfg` in rust-lang/rust#138907. When `docsrs` is enabled, the old `doc_auto_cfg` results in the following errors on the latest nightlies: ``` error[E0557]: feature has been removed --> src/lib.rs:56:29 | 56 | #![cfg_attr(docsrs, feature(doc_auto_cfg))] | ^^^^^^^^^^^^ feature has been removed | = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information = note: merged into `doc_cfg` ``` ``` error[E0557]: feature has been removed --> rand_core/src/lib.rs:36:29 | 36 | #![cfg_attr(docsrs, feature(doc_auto_cfg))] | ^^^^^^^^^^^^ feature has been removed | = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information = note: merged into `doc_cfg` ``` The new `doc_cfg` retains the automatic `cfg` generation that `doc_auto_cfg` used to provide.
1 parent 54ea272 commit 4cbd428

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rand_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#![deny(missing_debug_implementations)]
3434
#![deny(clippy::undocumented_unsafe_blocks)]
3535
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
36-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
36+
#![cfg_attr(docsrs, feature(doc_cfg))]
3737
#![no_std]
3838

3939
#[cfg(feature = "std")]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
all(feature = "simd_support", target_feature = "avx512bw"),
5454
feature(stdarch_x86_avx512)
5555
)]
56-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
56+
#![cfg_attr(docsrs, feature(doc_cfg))]
5757
#![allow(
5858
clippy::float_cmp,
5959
clippy::neg_cmp_op_on_partial_ord,

0 commit comments

Comments
 (0)