about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-06 22:14:38 +0200
committerGitHub <noreply@github.com>2019-07-06 22:14:38 +0200
commit30e4a874cb31a55294d80ee3eda3d41bf8a8ec8f (patch)
tree361480d66747a8fe02e16b8eead77809b230b9eb /src/librustc_codegen_llvm
parent154726cf7d92e72e3386e056cf0ec61902f342cd (diff)
parent7646d4935b50c02f97545705af46ab46116db91d (diff)
downloadrust-30e4a874cb31a55294d80ee3eda3d41bf8a8ec8f.tar.gz
rust-30e4a874cb31a55294d80ee3eda3d41bf8a8ec8f.zip
Rollup merge of #62422 - lzutao:remove-some-mem-uinit, r=alexcrichton
Remove some uses of mem::uninitialized

cc #62397
r? @RalfJung
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))