Reduce size of InterpErrorInfo to 8 bytes

This commit is contained in:
Tomasz Miąsko
2021-02-14 00:00:00 +00:00
parent ee88f46bb5
commit e190f0d974
7 changed files with 47 additions and 24 deletions

View File

@@ -245,8 +245,8 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
Ok(Some(match ecx.load_mir(instance.def, None) {
Ok(body) => body,
Err(err) => {
if let err_unsup!(NoMirFor(did)) = err.kind {
let path = ecx.tcx.def_path_str(did);
if let err_unsup!(NoMirFor(did)) = err.kind() {
let path = ecx.tcx.def_path_str(*did);
return Err(ConstEvalErrKind::NeedsRfc(format!(
"calling extern function `{}`",
path