Skip to content

Commit

Permalink
Remove use of mem::uninitialized in code_gen crate
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jul 6, 2019
1 parent 42c3d37 commit 7646d49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_codegen_llvm/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7646d49

Please sign in to comment.