diff --git a/std/src/sys/pal/windows/c.rs b/std/src/sys/pal/windows/c.rs
index 8900410cf609b..b888eb7d95ca3 100644
--- a/std/src/sys/pal/windows/c.rs
+++ b/std/src/sys/pal/windows/c.rs
@@ -112,16 +112,9 @@ if #[cfg(not(target_vendor = "uwp"))] {
 #[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")
+    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;
 }