Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/backends/rdrand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ fn is_rdrand_good() -> bool {
{
// SAFETY: All Rust x86 targets are new enough to have CPUID, and we
// check that leaf 1 is supported before using it.
//
// TODO(MSRV 1.94): remove allow(unused_unsafe) and the unsafe blocks for `__cpuid`.
#[allow(unused_unsafe)]
let cpuid0 = unsafe { arch::__cpuid(0) };
if cpuid0.eax < 1 {
return false;
}
#[allow(unused_unsafe)]
let cpuid1 = unsafe { arch::__cpuid(1) };

let vendor_id = [
Expand Down