Skip to content

Commit 4762ebb

Browse files
committed
rm unneeded checks
1 parent 817f097 commit 4762ebb

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+1
-5
lines changed

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
428428
return None;
429429
}
430430
let mut mplace = None;
431-
let alloc_id = self
431+
let _alloc_id = self
432432
.ecx
433433
.intern_with_temp_alloc(ty, |ecx, dest| {
434434
// FIXME: Can we speed it up by using `ecx.write_immediate(.ScalarPair(_), dest)`?
@@ -443,11 +443,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
443443
Ok(())
444444
})
445445
.ok()?;
446-
let GlobalAlloc::Memory(_alloc) = self.tcx.global_alloc(alloc_id) else {
447-
bug!()
448-
};
449446
let mplace = mplace.unwrap();
450-
debug!(?mplace);
451447
return Some(mplace.into());
452448
} else if matches!(ty.abi, Abi::Scalar(..) | Abi::ScalarPair(..)) {
453449
let dest = self.ecx.allocate(ty, MemoryKind::Stack).ok()?;

0 commit comments

Comments
 (0)