Skip to content

Commit 05a1590

Browse files
sorairolakenwalfield
authored andcommitted
chore: Replace doc_auto_cfg with doc_cfg (#1664)
- [ ] Added a `CHANGELOG.md` entry Replace the removed `doc_auto_cfg` feature with the `doc_cfg` feature. Avoid compilation errors when building documentation. `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 ed3e53e commit 05a1590

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

rand_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#![deny(missing_docs)]
3636
#![deny(missing_debug_implementations)]
3737
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
38-
#![cfg_attr(doc_cfg, feature(doc_cfg))]
38+
#![cfg_attr(docsrs, feature(doc_cfg))]
3939
#![no_std]
4040

4141
use core::convert::AsMut;

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
#![deny(missing_debug_implementations)]
5050
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
5151
#![no_std]
52-
#![cfg_attr(feature = "simd_support", feature(stdsimd))]
53-
#![cfg_attr(doc_cfg, feature(doc_cfg))]
52+
#![cfg_attr(docsrs, feature(doc_cfg))]
5453
#![allow(
5554
clippy::float_cmp,
5655
clippy::neg_cmp_op_on_partial_ord,

0 commit comments

Comments
 (0)