From 7646d4935b50c02f97545705af46ab46116db91d Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Fri, 5 Jul 2019 19:26:25 +0000 Subject: [PATCH] Remove use of mem::uninitialized in code_gen crate --- src/librustc_codegen_llvm/common.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs index 9fdc93c3ff0f3..3b2701b893bb1 100644 --- a/src/librustc_codegen_llvm/common.rs +++ b/src/librustc_codegen_llvm/common.rs @@ -170,8 +170,7 @@ impl CodegenCx<'ll, 'tcx> { pub fn const_get_real(&self, v: &'ll Value) -> Option<(f64, bool)> { unsafe { if self.is_const_real(v) { - #[allow(deprecated)] - let mut loses_info: llvm::Bool = ::std::mem::uninitialized(); + let mut loses_info: llvm::Bool = 0; let r = llvm::LLVMConstRealGetDouble(v, &mut loses_info); let loses_info = if loses_info == 1 { true } else { false }; Some((r, loses_info))