1
Fork 0

interpret errors: add map_err_kind, rename InterpError -> InterpErrorKind

This commit is contained in:
Ralf Jung 2024-10-19 08:49:13 +02:00
parent b27f33a4d9
commit eea74be5c1
17 changed files with 108 additions and 95 deletions

View file

@ -232,7 +232,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
F: FnOnce(&mut Self) -> InterpResult<'tcx, T>,
{
f(self)
.map_err(|err| {
.map_err_info(|err| {
trace!("InterpCx operation failed: {:?}", err);
// Some errors shouldn't come up because creating them causes
// an allocation, which we should avoid. When that happens,