Skip to content

Commit a0bc4fc

Browse files
committed
Do not require absence of metadata.
1 parent 7bceb4f commit a0bc4fc

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+2
-4
lines changed

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//! ```
5555
5656
use rustc_const_eval::interpret::{intern_const_alloc_for_constprop, MemoryKind};
57-
use rustc_const_eval::interpret::{ImmTy, InterpCx, MemPlaceMeta, OpTy, Projectable, Scalar};
57+
use rustc_const_eval::interpret::{ImmTy, InterpCx, OpTy, Projectable, Scalar};
5858
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
5959
use rustc_data_structures::graph::dominators::Dominators;
6060
use rustc_hir::def::DefKind;
@@ -852,9 +852,7 @@ fn op_to_prop_const<'tcx>(
852852
}
853853

854854
// If this constant is a projection of another, we can return it directly.
855-
if let Either::Left(mplace) = op.as_mplace_or_imm()
856-
&& let MemPlaceMeta::None = mplace.meta()
857-
{
855+
if let Either::Left(mplace) = op.as_mplace_or_imm() {
858856
let (size, _align) = ecx.size_and_align_of_mplace(&mplace).ok()??;
859857

860858
// Do not try interning a value that contains provenance.

0 commit comments

Comments
 (0)