about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-29 02:38:32 +0000
committerbors <bors@rust-lang.org>2024-08-29 02:38:32 +0000
commit6cf068db566de080dfa7ed24a216ea3aed2b98ce (patch)
treed51916b4cd8fdc73dd70fdaa1d3e56bb7b1e6ada /library/std/src/sys
parentacb4e8b6251f1d8da36f08e7a70fa23fc581839e (diff)
parentbd66fadd79ac0d05be85a229ba6d295e50c24ade (diff)
downloadrust-6cf068db566de080dfa7ed24a216ea3aed2b98ce.tar.gz
rust-6cf068db566de080dfa7ed24a216ea3aed2b98ce.zip
Auto merge of #129721 - workingjubilee:rollup-y2o1mnp, r=workingjubilee
Rollup of 14 pull requests

Successful merges:

 - #128192 (rustc_target: Add various aarch64 features)
 - #129170 (Add an ability to convert between `Span` and `visit::Location`)
 - #129343 (Emit specific message for time<=0.3.35)
 - #129378 (Clean up cfg-gating of ProcessPrng extern)
 - #129401 (Partially stabilize `feature(new_uninit)`)
 - #129467 (derive(SmartPointer): assume pointee from the single generic and better error messages)
 - #129494 (format code in tests/ui/threads-sendsync)
 - #129617 (Update books)
 - #129673 (Add fmt::Debug to sync::Weak<T, A>)
 - #129683 (copysign with sign being a NaN can have non-portable results)
 - #129689 (Move `'tcx` lifetime off of impl and onto methods for `CrateMetadataRef`)
 - #129695 (Fix path to run clippy on rustdoc)
 - #129712 (Correct trusty targets to be tier 3)
 - #129715 (Update `compiler_builtins` to `0.1.123`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/pal/windows/c.rs22
1 files changed, 9 insertions, 13 deletions
diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs
index 2f5d75dc4bc..b888eb7d95c 100644
--- a/library/std/src/sys/pal/windows/c.rs
+++ b/library/std/src/sys/pal/windows/c.rs
@@ -109,19 +109,15 @@ if #[cfg(not(target_vendor = "uwp"))] {
 }
 
 // Use raw-dylib to import ProcessPrng as we can't rely on there being an import library.
-cfg_if::cfg_if! {
-if #[cfg(not(target_vendor = "win7"))] {
-    #[cfg(target_arch = "x86")]
-    #[link(name = "bcryptprimitives", kind = "raw-dylib", import_name_type = "undecorated")]
-    extern "system" {
-        pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL;
-    }
-    #[cfg(not(target_arch = "x86"))]
-    #[link(name = "bcryptprimitives", kind = "raw-dylib")]
-    extern "system" {
-        pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL;
-    }
-}}
+#[cfg(not(target_vendor = "win7"))]
+#[cfg_attr(
+    target_arch = "x86",
+    link(name = "bcryptprimitives", kind = "raw-dylib", import_name_type = "undecorated")
+)]
+#[cfg_attr(not(target_arch = "x86"), link(name = "bcryptprimitives", kind = "raw-dylib"))]
+extern "system" {
+    pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL;
+}
 
 // Functions that aren't available on every version of Windows that we support,
 // but we still use them and just provide some form of a fallback implementation.