Move validation into eval_body_using_ecx
This commit is contained in:
parent
cc7e0b2200
commit
2e6c4900b6
1 changed files with 4 additions and 6 deletions
|
@ -84,6 +84,9 @@ fn eval_body_using_ecx<'mir, 'tcx>(
|
||||||
// Intern the result
|
// Intern the result
|
||||||
intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
|
intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
|
||||||
|
|
||||||
|
// Since evaluation had no errors, validate the resulting constant.
|
||||||
|
const_validate_mplace(&ecx, &ret, cid)?;
|
||||||
|
|
||||||
Ok(ret)
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,12 +385,7 @@ fn eval_in_interpreter<'tcx, R: InterpretationResult<'tcx>>(
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
Ok(mplace) => {
|
Ok(mplace) => Ok(R::make_result(mplace, ecx)),
|
||||||
// Since evaluation had no errors, validate the resulting constant.
|
|
||||||
const_validate_mplace(&ecx, &mplace, cid)?;
|
|
||||||
|
|
||||||
Ok(R::make_result(mplace, ecx))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue