about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/terminator.rs
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2024-02-05 14:54:24 +0100
committerLukas Markeffsky <@>2024-02-05 15:37:21 +0100
commit0c1f401d98c17372d4f305602a43e53cd2ef78a6 (patch)
tree46bcda5b2bbb282dbc4783b38b27d45812224738 /compiler/rustc_const_eval/src/interpret/terminator.rs
parent77fb5406842d6e349b4d67289eba5a9a4a571a9a (diff)
downloadrust-0c1f401d98c17372d4f305602a43e53cd2ef78a6.tar.gz
rust-0c1f401d98c17372d4f305602a43e53cd2ef78a6.zip
old solver: improve normalization of `Pointee::Metadata`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/terminator.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/terminator.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs
index b7ffb4a16fc..eaaf56baf3b 100644
--- a/compiler/rustc_const_eval/src/interpret/terminator.rs
+++ b/compiler/rustc_const_eval/src/interpret/terminator.rs
@@ -377,12 +377,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                 // to fields, which can yield non-normalized types. So we need to provide a
                 // normalization function.
                 let normalize = |ty| self.tcx.normalize_erasing_regions(self.param_env, ty);
-                let (meta, only_if_sized) = ty.ptr_metadata_ty(*self.tcx, normalize);
-                assert!(
-                    !only_if_sized,
-                    "there should be no more 'maybe has that metadata' types during interpretation"
-                );
-                meta
+                ty.ptr_metadata_ty(*self.tcx, normalize)
             };
             return Ok(meta_ty(caller) == meta_ty(callee));
         }