Permit use of mem::uninitialized via allow(deprecated)

This commit is contained in:
Mark Rousskov
2019-07-04 11:24:56 -04:00
parent 8a7dded1a2
commit 007d87f171
20 changed files with 30 additions and 9 deletions

View File

@@ -170,6 +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 r = llvm::LLVMConstRealGetDouble(v, &mut loses_info);
let loses_info = if loses_info == 1 { true } else { false };