Skip to content

Commit b13a6fc

Browse files
committed
Switch to rtabort! for unimeplemented/unused fallbacks
1 parent 811ed7f commit b13a6fc

File tree

1 file changed

+24
-24
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+24
-24
lines changed

library/std/src/sys/pal/windows/c.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ compat_fn_with_fallback! {
202202
addresssize: usize,
203203
dwmilliseconds: u32
204204
) -> BOOL {
205-
unimplemented!()
205+
rtabort!("unimplemented")
206206
}
207207
pub fn WakeByAddressSingle(address: *const c_void) {
208-
unimplemented!()
208+
rtabort!("unimplemented")
209209
}
210210
pub fn WakeByAddressAll(address: *const c_void) {
211-
unimplemented!()
211+
rtabort!("unimplemented")
212212
}
213213
}
214214

@@ -303,7 +303,7 @@ compat_fn_with_fallback! {
303303
shareaccess: u32,
304304
openoptions: u32
305305
) -> NTSTATUS {
306-
STATUS_NOT_IMPLEMENTED
306+
rtabort!("unimplemented")
307307
}
308308
}
309309

@@ -318,33 +318,33 @@ compat_fn_with_fallback! {
318318
hobjecttowaiton: HANDLE,
319319
dwmilliseconds: u32,
320320
balertable: BOOL
321-
) -> WAIT_EVENT { unimplemented!() }
321+
) -> WAIT_EVENT { rtabort!("unimplemented") }
322322
// >= NT 4
323323
// https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-tryentercriticalsection
324324
pub fn TryEnterCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) -> BOOL {
325-
unimplemented!()
325+
rtabort!("unimplemented")
326326
}
327327
// >= Win7 / Server 2008 R2
328328
// https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-tryacquiresrwlockexclusive
329-
pub fn TryAcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> BOOLEAN { unimplemented!() }
330-
pub fn TryAcquireSRWLockShared(srwlock: *mut SRWLOCK) -> BOOLEAN { unimplemented!() }
329+
pub fn TryAcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> BOOLEAN { rtabort!("unimplemented") }
330+
pub fn TryAcquireSRWLockShared(srwlock: *mut SRWLOCK) -> BOOLEAN { rtabort!("unimplemented") }
331331
// >= Vista / Server 2008
332332
// https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-acquiresrwlockexclusive
333-
pub fn AcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> () { unimplemented!() }
334-
pub fn AcquireSRWLockShared(srwlock: *mut SRWLOCK) -> () { unimplemented!() }
335-
pub fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK) -> () { unimplemented!() }
336-
pub fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK) -> () { unimplemented!() }
333+
pub fn AcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> () { rtabort!("unimplemented") }
334+
pub fn AcquireSRWLockShared(srwlock: *mut SRWLOCK) -> () { rtabort!("unimplemented") }
335+
pub fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK) -> () { rtabort!("unimplemented") }
336+
pub fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK) -> () { rtabort!("unimplemented") }
337337
pub fn SleepConditionVariableSRW(
338338
conditionvariable: *mut CONDITION_VARIABLE,
339339
srwlock: *mut SRWLOCK,
340340
dwmilliseconds: u32,
341341
flags: u32,
342-
) -> BOOL { unimplemented!() }
342+
) -> BOOL { rtabort!("unimplemented") }
343343
pub fn WakeAllConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) -> () {
344-
unimplemented!()
344+
rtabort!("unimplemented")
345345
}
346346
pub fn WakeConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) -> () {
347-
unimplemented!()
347+
rtabort!("unimplemented")
348348
}
349349
}
350350

@@ -482,7 +482,7 @@ compat_fn_with_fallback! {
482482
cchfilepath: u32,
483483
dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS
484484
) -> u32 {
485-
unimplemented!()
485+
rtabort!("unimplemented")
486486
}
487487
// >= 2000
488488
// https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createhardlinkw
@@ -505,7 +505,7 @@ compat_fn_with_fallback! {
505505
randombuffer: *mut core::ffi::c_void,
506506
randombufferlength: u32
507507
) -> BOOLEAN {
508-
unimplemented!()
508+
rtabort!("unimplemented")
509509
}
510510

511511
// >= NT 4.0 / Windows 95 OSR2 / Windows 95 with IE 3.02
@@ -517,13 +517,13 @@ compat_fn_with_fallback! {
517517
dwprovtype: u32,
518518
dwflags: u32
519519
) -> BOOL {
520-
unimplemented!()
520+
rtabort!("unimplemented")
521521
}
522522
pub fn CryptReleaseContext(hprov: usize, dwflags: u32) -> BOOL {
523-
unimplemented!()
523+
rtabort!("unimplemented")
524524
}
525525
pub fn CryptGenRandom(hprov: usize, dwlen: u32, pbbuffer: *mut u8) -> BOOL {
526-
unimplemented!()
526+
rtabort!("unimplemented")
527527
}
528528
}
529529
#[cfg(target_vendor = "rust9x")]
@@ -630,7 +630,7 @@ compat_fn_with_fallback! {
630630
dwflags: u32,
631631
lpsize: *mut usize
632632
) -> BOOL {
633-
unimplemented!()
633+
rtabort!("unimplemented")
634634
}
635635
// >= Vista / Server 2008
636636
pub fn UpdateProcThreadAttribute(
@@ -642,11 +642,11 @@ compat_fn_with_fallback! {
642642
lppreviousvalue: *mut core::ffi::c_void,
643643
lpreturnsize: *const usize
644644
) -> BOOL {
645-
unimplemented!()
645+
rtabort!("unimplemented")
646646
}
647647
// >= Vista / Server 2008
648648
pub fn DeleteProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST) {
649-
unimplemented!()
649+
rtabort!("unimplemented")
650650
}
651651
}
652652

@@ -673,7 +673,7 @@ compat_fn_with_fallback! {
673673
cchcount2: i32,
674674
bignorecase: BOOL,
675675
) -> COMPARESTRING_RESULT {
676-
unimplemented!()
676+
rtabort!("unimplemented")
677677
}
678678
}
679679

0 commit comments

Comments
 (0)