diff options
| author | Shoyu Vanilla <modulo641@gmail.com> | 2024-02-12 15:39:32 +0900 |
|---|---|---|
| committer | Shoyu Vanilla <modulo641@gmail.com> | 2024-02-12 15:46:35 +0900 |
| commit | 3856df059ed90b8fd19a82efbfb9da36f68e6bb9 (patch) | |
| tree | 7a43e8e838ec0c6fc06a3e9f9b77c4e77246f179 /compiler/rustc_const_eval/src/interpret/operand.rs | |
| parent | 084ce5bdb5f7dc1c725f6770a8de281165ba3b0a (diff) | |
| download | rust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.tar.gz rust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.zip | |
Dejargnonize subst
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/operand.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index 4653c9016c6..317e5673b51 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -696,9 +696,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { trace!("eval_place_to_op: got {:?}", op); // Sanity-check the type we ended up with. if cfg!(debug_assertions) { - let normalized_place_ty = self.subst_from_current_frame_and_normalize_erasing_regions( - mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty, - )?; + let normalized_place_ty = self + .instantiate_from_current_frame_and_normalize_erasing_regions( + mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty, + )?; if !mir_assign_valid_types( *self.tcx, self.param_env, @@ -731,8 +732,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { &Copy(place) | &Move(place) => self.eval_place_to_op(place, layout)?, Constant(constant) => { - let c = - self.subst_from_current_frame_and_normalize_erasing_regions(constant.const_)?; + let c = self.instantiate_from_current_frame_and_normalize_erasing_regions( + constant.const_, + )?; // This can still fail: // * During ConstProp, with `TooGeneric` or since the `required_consts` were not all |
