about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-07-05 19:26:25 +0000
committerLzu Tao <taolzu@gmail.com>2019-07-06 03:27:05 +0000
commit7646d4935b50c02f97545705af46ab46116db91d (patch)
tree494da6dd91f5c80c0c22337c9c36550e640869a5 /src/librustc_codegen_llvm
parent42c3d3714508c9ab51e5c83dd78a37dbc5e2890c (diff)
downloadrust-7646d4935b50c02f97545705af46ab46116db91d.tar.gz
rust-7646d4935b50c02f97545705af46ab46116db91d.zip
Remove use of mem::uninitialized in code_gen crate
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/common.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs
index 9fdc93c3ff0..3b2701b893b 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))