diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-10-12 16:15:52 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-10-25 06:46:48 +0000 |
| commit | e3538d11f1ca94737e21676a54f8de65523d614c (patch) | |
| tree | 072ed82a9e80b7caaed95d72c4c857bc6f0b5dc9 | |
| parent | 59235a79072b393155e86beb96f9618ea0a914f6 (diff) | |
| download | rust-e3538d11f1ca94737e21676a54f8de65523d614c.tar.gz rust-e3538d11f1ca94737e21676a54f8de65523d614c.zip | |
Do not require absence of metadata.
| -rw-r--r-- | compiler/rustc_mir_transform/src/gvn.rs | 6 |
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. |
