Skip to content

Commit f7c8a49

Browse files
authored
Address unexpected_cfgs warnings (#115)
* Update nightly toolchain to 2024-05-20 * Replace custom doc_cfg config by the standard docsrs one * Remove obsolete target_env = "gnueabi" * Remove blanket unexpected_cfgs allow
1 parent 8a0c623 commit f7c8a49

5 files changed

Lines changed: 5 additions & 9 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,3 @@ unstable-errno = ["thread"]
130130

131131
[package.metadata.docs.rs]
132132
features = ["origin-thread", "origin-signal", "origin-start"]
133-
rustdoc-args = ["--cfg", "doc_cfg"]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-05-16"
2+
channel = "nightly-2024-05-20"
33
components = ["rustc", "cargo", "rust-std", "rust-src", "rustfmt"]

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#![doc = include_str!("../README.md")]
22
#![deny(missing_docs)]
33
#![cfg_attr(debug_assertions, allow(internal_features))]
4-
#![cfg_attr(doc_cfg, feature(doc_cfg))]
4+
#![cfg_attr(docsrs, feature(doc_cfg))]
55
#![feature(asm_const)]
66
#![feature(naked_functions)]
77
#![cfg_attr(debug_assertions, feature(link_llvm_intrinsics))]
88
#![cfg_attr(feature = "experimental-relocate", feature(cfg_relocation_model))]
99
#![feature(strict_provenance)]
1010
#![feature(exposed_provenance)]
1111
#![deny(fuzzy_provenance_casts, lossy_provenance_casts)]
12-
#![allow(unexpected_cfgs)]
1312
#![no_std]
1413

1514
#[cfg(all(feature = "alloc", not(feature = "rustc-dep-of-std")))]
@@ -42,12 +41,12 @@ mod relocate;
4241

4342
pub mod program;
4443
#[cfg(feature = "signal")]
45-
#[cfg_attr(doc_cfg, doc(cfg(feature = "signal")))]
44+
#[cfg_attr(docsrs, doc(cfg(feature = "signal")))]
4645
#[cfg_attr(feature = "origin-signal", path = "signal/linux_raw.rs")]
4746
#[cfg_attr(not(feature = "origin-signal"), path = "signal/libc.rs")]
4847
pub mod signal;
4948
#[cfg(feature = "thread")]
50-
#[cfg_attr(doc_cfg, doc(cfg(feature = "thread")))]
49+
#[cfg_attr(docsrs, doc(cfg(feature = "thread")))]
5150
#[cfg_attr(feature = "origin-thread", path = "thread/linux_raw.rs")]
5251
#[cfg_attr(not(feature = "origin-thread"), path = "thread/libc.rs")]
5352
pub mod thread;

src/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static mut DTORS: Dtors = Dtors(smallvec::SmallVec::new_const());
248248
/// This arranges for `func` to be called, and passed `obj`, when the program
249249
/// exits.
250250
#[cfg(feature = "alloc")]
251-
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
251+
#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
252252
pub fn at_exit(func: Box<dyn FnOnce() + Send>) {
253253
#[cfg(feature = "origin-program")]
254254
{

tests/utils/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ pub fn arch() -> String {
1111
let arch = "i686";
1212
#[cfg(target_arch = "arm")]
1313
let arch = "armv5te";
14-
#[cfg(target_env = "gnueabi")]
15-
let env = "gnueabi";
1614
#[cfg(all(target_env = "gnu", target_abi = "eabi"))]
1715
let env = "gnueabi";
1816
#[cfg(all(target_env = "gnu", not(target_abi = "eabi")))]

0 commit comments

Comments
 (0)