Skip to content

Commit

Permalink
Address unexpected_cfgs warnings (#115)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Urgau committed May 28, 2024
1 parent 8a0c623 commit f7c8a49
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,3 @@ unstable-errno = ["thread"]

[package.metadata.docs.rs]
features = ["origin-thread", "origin-signal", "origin-start"]
rustdoc-args = ["--cfg", "doc_cfg"]
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-05-16"
channel = "nightly-2024-05-20"
components = ["rustc", "cargo", "rust-std", "rust-src", "rustfmt"]
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#![doc = include_str!("../README.md")]
#![deny(missing_docs)]
#![cfg_attr(debug_assertions, allow(internal_features))]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![feature(asm_const)]
#![feature(naked_functions)]
#![cfg_attr(debug_assertions, feature(link_llvm_intrinsics))]
#![cfg_attr(feature = "experimental-relocate", feature(cfg_relocation_model))]
#![feature(strict_provenance)]
#![feature(exposed_provenance)]
#![deny(fuzzy_provenance_casts, lossy_provenance_casts)]
#![allow(unexpected_cfgs)]
#![no_std]

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

pub mod program;
#[cfg(feature = "signal")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "signal")))]
#[cfg_attr(docsrs, doc(cfg(feature = "signal")))]
#[cfg_attr(feature = "origin-signal", path = "signal/linux_raw.rs")]
#[cfg_attr(not(feature = "origin-signal"), path = "signal/libc.rs")]
pub mod signal;
#[cfg(feature = "thread")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "thread")))]
#[cfg_attr(docsrs, doc(cfg(feature = "thread")))]
#[cfg_attr(feature = "origin-thread", path = "thread/linux_raw.rs")]
#[cfg_attr(not(feature = "origin-thread"), path = "thread/libc.rs")]
pub mod thread;
2 changes: 1 addition & 1 deletion src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static mut DTORS: Dtors = Dtors(smallvec::SmallVec::new_const());
/// This arranges for `func` to be called, and passed `obj`, when the program
/// exits.
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn at_exit(func: Box<dyn FnOnce() + Send>) {
#[cfg(feature = "origin-program")]
{
Expand Down
2 changes: 0 additions & 2 deletions tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ pub fn arch() -> String {
let arch = "i686";
#[cfg(target_arch = "arm")]
let arch = "armv5te";
#[cfg(target_env = "gnueabi")]
let env = "gnueabi";
#[cfg(all(target_env = "gnu", target_abi = "eabi"))]
let env = "gnueabi";
#[cfg(all(target_env = "gnu", not(target_abi = "eabi")))]
Expand Down

0 comments on commit f7c8a49

Please sign in to comment.