diff options
| author | Eric Huss <eric@huss.org> | 2025-02-09 09:12:30 -0800 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2025-02-09 09:12:30 -0800 |
| commit | 64e9ca74a8ffaedcae2490fe5245ab8c941efe30 (patch) | |
| tree | 495b0b277cbd7f263a97fc72eaf98f0e33b0f49f /library/stdarch/crates/std_detect/src/detect | |
| parent | fe2acd41842b0e7c08aa1479b60787d52e62cf75 (diff) | |
| download | rust-64e9ca74a8ffaedcae2490fe5245ab8c941efe30.tar.gz rust-64e9ca74a8ffaedcae2490fe5245ab8c941efe30.zip | |
Apply missing_unsafe_on_extern
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/cache.rs | 2 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/cache.rs b/library/stdarch/crates/std_detect/src/detect/cache.rs index cee07b0ec7e..3056c28a806 100644 --- a/library/stdarch/crates/std_detect/src/detect/cache.rs +++ b/library/stdarch/crates/std_detect/src/detect/cache.rs @@ -140,7 +140,7 @@ cfg_if::cfg_if! { if #[cfg(windows)] { use alloc::vec; #[link(name = "kernel32")] - extern "system" { + unsafe extern "system" { fn GetEnvironmentVariableA(name: *const u8, buffer: *mut u8, size: u32) -> u32; } let len = unsafe { GetEnvironmentVariableA(RUST_STD_DETECT_UNSTABLE.as_ptr().cast::<u8>(), core::ptr::null_mut(), 0) }; diff --git a/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs index faded671cc0..ec31701aecf 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs @@ -20,7 +20,7 @@ pub(crate) fn detect_features() -> cache::Initializer { const PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE: u32 = 44; const PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE: u32 = 45; - extern "system" { + unsafe extern "system" { pub fn IsProcessorFeaturePresent(ProcessorFeature: DWORD) -> BOOL; } |
