about summary refs log tree commit diff
path: root/library/std/src/sys/pal/sgx/mod.rs
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2024-08-15 13:28:02 +0200
committerjoboet <jonasboettiger@icloud.com>2024-09-23 10:29:51 +0200
commit5c1c72572479afe98734d5f78fa862abe662c41a (patch)
tree4f43788d776b0b1dfc423ef8d9852ece3960f9b3 /library/std/src/sys/pal/sgx/mod.rs
parent702987f75b74f789ba227ee04a3d7bb1680c2309 (diff)
downloadrust-5c1c72572479afe98734d5f78fa862abe662c41a.tar.gz
rust-5c1c72572479afe98734d5f78fa862abe662c41a.zip
std: implement the `random` feature
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
Diffstat (limited to 'library/std/src/sys/pal/sgx/mod.rs')
-rw-r--r--library/std/src/sys/pal/sgx/mod.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/library/std/src/sys/pal/sgx/mod.rs b/library/std/src/sys/pal/sgx/mod.rs
index 8d29b2ec619..586ccd18c2f 100644
--- a/library/std/src/sys/pal/sgx/mod.rs
+++ b/library/std/src/sys/pal/sgx/mod.rs
@@ -132,24 +132,6 @@ pub extern "C" fn __rust_abort() {
     abort_internal();
 }
 
-pub mod rand {
-    pub fn rdrand64() -> u64 {
-        unsafe {
-            let mut ret: u64 = 0;
-            for _ in 0..10 {
-                if crate::arch::x86_64::_rdrand64_step(&mut ret) == 1 {
-                    return ret;
-                }
-            }
-            rtabort!("Failed to obtain random data");
-        }
-    }
-}
-
-pub fn hashmap_random_keys() -> (u64, u64) {
-    (self::rand::rdrand64(), self::rand::rdrand64())
-}
-
 pub use crate::sys_common::{AsInner, FromInner, IntoInner};
 
 pub trait TryIntoInner<Inner>: Sized {