Skip to content

Commit 9c97753

Browse files
committed
fix some unused constant warning on some Windows targets
1 parent b6ab1fa commit 9c97753

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/panic_abort/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ pub unsafe extern "C-unwind" fn __rust_start_panic(_payload: *mut &mut dyn BoxMe
6565
//
6666
// Note: this is the same implementation as in libstd's `abort_internal`
6767
unsafe fn abort() -> ! {
68+
#[allow(unused)]
6869
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
6970
cfg_if::cfg_if! {
7071
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {

library/std/src/sys/windows/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD {
289289
/// that function for more information on `__fastfail`
290290
#[allow(unreachable_code)]
291291
pub fn abort_internal() -> ! {
292+
#[allow(unused)]
292293
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
293294
#[cfg(not(miri))] // inline assembly does not work in Miri
294295
unsafe {

0 commit comments

Comments
 (0)