From 5ea5e9fc2c0848d1d670f02644ea953e0800a123 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 10 Aug 2020 09:02:45 +0200 Subject: [PATCH] accept ReferencedConstant errors in Miri (can happen post-monomorphization) --- src/diagnostics.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/diagnostics.rs b/src/diagnostics.rs index a20e8126c1..ca3dd4dd66 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -88,6 +88,8 @@ pub fn report_error<'tcx, 'mir>( "Undefined Behavior", ResourceExhaustion(_) => "resource exhaustion", + InvalidProgram(InvalidProgramInfo::ReferencedConstant) => + "post-monomorphization error", _ => bug!("This error should be impossible in Miri: {}", e), };