mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
Remove last use of mem::uninitialized in SGX
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
//! This module contains the facade (aka platform-specific) implementations of
|
||||
//! OS level functionality for Fortanix SGX.
|
||||
|
||||
#![allow(deprecated)]
|
||||
|
||||
use crate::io::ErrorKind;
|
||||
use crate::os::raw::c_char;
|
||||
use crate::sync::atomic::{AtomicBool, Ordering};
|
||||
@@ -142,7 +140,7 @@ pub unsafe fn abort_internal() -> ! {
|
||||
pub fn hashmap_random_keys() -> (u64, u64) {
|
||||
fn rdrand64() -> u64 {
|
||||
unsafe {
|
||||
let mut ret: u64 = crate::mem::uninitialized();
|
||||
let mut ret: u64 = 0;
|
||||
for _ in 0..10 {
|
||||
if crate::arch::x86_64::_rdrand64_step(&mut ret) == 1 {
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user