Rollup merge of #102021 - lcnr:tyConst-fun, r=b-naber,BoxyUwU
some post-valtree cleanup r? project-const-generics cc ```@b-naber```
This commit is contained in:
commit
b149c48186
12 changed files with 58 additions and 122 deletions
|
@ -683,11 +683,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
self.stack_mut().push(frame);
|
||||
|
||||
// Make sure all the constants required by this frame evaluate successfully (post-monomorphization check).
|
||||
for const_ in &body.required_consts {
|
||||
let span = const_.span;
|
||||
let const_ =
|
||||
self.subst_from_current_frame_and_normalize_erasing_regions(const_.literal)?;
|
||||
self.mir_const_to_op(&const_, None).map_err(|err| {
|
||||
for ct in &body.required_consts {
|
||||
let span = ct.span;
|
||||
let ct = self.subst_from_current_frame_and_normalize_erasing_regions(ct.literal)?;
|
||||
self.const_to_op(&ct, None).map_err(|err| {
|
||||
// If there was an error, set the span of the current frame to this constant.
|
||||
// Avoiding doing this when evaluation succeeds.
|
||||
self.frame_mut().loc = Err(span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue