Fix cfg guards
This commit is contained in:
parent
5c6294ae7b
commit
25bd5a558b
@ -190,7 +190,7 @@ mod_use!(cfg(target_os = "redox"), use_file);
|
||||
mod_use!(cfg(target_os = "solaris"), solaris_illumos);
|
||||
mod_use!(cfg(windows), windows);
|
||||
mod_use!(cfg(target_env = "sgx"), rdrand);
|
||||
mod_use!(cfg(target_os = "uefi"), rdrand);
|
||||
mod_use!(cfg(all(target_arch = "x86_64", target_os = "uefi")), rdrand);
|
||||
mod_use!(cfg(target_os = "wasi"), wasi);
|
||||
|
||||
mod_use!(
|
||||
@ -232,7 +232,7 @@ mod_use!(
|
||||
target_os = "openbsd",
|
||||
target_os = "redox",
|
||||
target_os = "solaris",
|
||||
target_os = "uefi",
|
||||
all(target_arch = "x86_64", target_os = "uefi"),
|
||||
target_env = "sgx",
|
||||
windows,
|
||||
all(
|
||||
|
@ -31,7 +31,7 @@ unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
|
||||
Err(Error::UNKNOWN)
|
||||
}
|
||||
|
||||
#[cfg(and(target_env = "sgx", not(target_feature = "rdrand")))]
|
||||
#[cfg(all(target_env = "sgx", not(target_feature = "rdrand")))]
|
||||
compile_error!("SGX targets must enable RDRAND to get randomness");
|
||||
|
||||
// TODO use is_x86_feature_detected!("rdrand") when that works in core. See:
|
||||
|
Loading…
x
Reference in New Issue
Block a user