Fix warnings

This commit is contained in:
Gary Guo 2023-10-28 00:13:46 +01:00
parent 36895d362c
commit 9704d0bf23
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

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