Skip to content

Commit

Permalink
Rollup merge of #62414 - jethrogb:jb/sgx-uninit, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Remove last use of mem::uninitialized in SGX

See #62397
  • Loading branch information
Centril authored Jul 5, 2019
2 parents 08111e1 + 7fb17d8 commit 7ed1b8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libstd/sys/sgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -142,7 +140,7 @@ pub unsafe extern "C" fn __rust_abort() {
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;
Expand Down

0 comments on commit 7ed1b8c

Please sign in to comment.