about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-10-12 16:15:52 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-10-25 06:46:48 +0000
commite3538d11f1ca94737e21676a54f8de65523d614c (patch)
tree072ed82a9e80b7caaed95d72c4c857bc6f0b5dc9
parent59235a79072b393155e86beb96f9618ea0a914f6 (diff)
downloadrust-e3538d11f1ca94737e21676a54f8de65523d614c.tar.gz
rust-e3538d11f1ca94737e21676a54f8de65523d614c.zip
Do not require absence of metadata.
-rw-r--r--compiler/rustc_mir_transform/src/gvn.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/gvn.rs b/compiler/rustc_mir_transform/src/gvn.rs
index 483a1b3f6df..c575da611c7 100644
--- a/compiler/rustc_mir_transform/src/gvn.rs
+++ b/compiler/rustc_mir_transform/src/gvn.rs
@@ -54,7 +54,7 @@
 //! ```
 
 use rustc_const_eval::interpret::{intern_const_alloc_for_constprop, MemoryKind};
-use rustc_const_eval::interpret::{ImmTy, InterpCx, MemPlaceMeta, OpTy, Projectable, Scalar};
+use rustc_const_eval::interpret::{ImmTy, InterpCx, OpTy, Projectable, Scalar};
 use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
 use rustc_data_structures::graph::dominators::Dominators;
 use rustc_hir::def::DefKind;
@@ -852,9 +852,7 @@ fn op_to_prop_const<'tcx>(
     }
 
     // If this constant is a projection of another, we can return it directly.
-    if let Either::Left(mplace) = op.as_mplace_or_imm()
-        && let MemPlaceMeta::None = mplace.meta()
-    {
+    if let Either::Left(mplace) = op.as_mplace_or_imm() {
         let (size, _align) = ecx.size_and_align_of_mplace(&mplace).ok()??;
 
         // Do not try interning a value that contains provenance.