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() -> ! {