Skip to content

Commit b2ea45f

Browse files
committed
rdrand: allow(unused_unsafe) when calling __cpuid
This is currently a release blocker: #769
1 parent f67c701 commit b2ea45f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backends/rdrand.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ fn is_rdrand_good() -> bool {
7777
{
7878
// SAFETY: All Rust x86 targets are new enough to have CPUID, and we
7979
// check that leaf 1 is supported before using it.
80+
#[allow(unused_unsafe)]
8081
let cpuid0 = unsafe { arch::__cpuid(0) };
8182
if cpuid0.eax < 1 {
8283
return false;
8384
}
85+
#[allow(unused_unsafe)]
8486
let cpuid1 = unsafe { arch::__cpuid(1) };
8587

8688
let vendor_id = [

0 commit comments

Comments
 (0)