From 9704d0bf23b6586e62704c3731927be9d26dcffb Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 28 Oct 2023 00:13:46 +0100 Subject: [PATCH] Fix warnings --- src/lib.rs | 6 ++++-- src/util.rs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 97cb357..faa4488 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,8 +3,10 @@ #![feature(naked_functions)] // lang_items is an internal feature. `internal_features` lint is added recently // so also allow unknown lints to prevent warning in older nightly versions. -#![allow(unknown_lints)] -#![allow(internal_features)] +#![cfg_attr( + any(feature = "personality", feature = "personality-dummy"), + allow(internal_features) +)] #![cfg_attr( any(feature = "personality", feature = "personality-dummy"), feature(lang_items) diff --git a/src/util.rs b/src/util.rs index e28a8a0..7c66e81 100644 --- a/src/util.rs +++ b/src/util.rs @@ -25,7 +25,7 @@ pub use libc::c_int; pub type c_int = i32; #[cfg(all( - any(feature = "panicking", feature = "panic-handler-dummy"), + any(feature = "panic", feature = "panic-handler-dummy"), feature = "libc" ))] pub fn abort() -> ! { @@ -33,7 +33,7 @@ pub fn abort() -> ! { } #[cfg(all( - any(feature = "panicking", feature = "panic-handler-dummy"), + any(feature = "panic", feature = "panic-handler-dummy"), not(feature = "libc") ))] pub fn abort() -> ! {