Skip to content

Commit

Permalink
Auto merge of #1503 - RalfJung:post-mono, r=RalfJung
Browse files Browse the repository at this point in the history
accept some post-monomorphization errors

For #1382, we also need to allow `ReferencedConstant` post-monomorphization errors. The other post-monomorphization errors should still be impossible to trigger in Miri. The fix is not complete though without rust-lang/rust#75339.
  • Loading branch information
bors committed Aug 10, 2020
2 parents 52c7b8e + 5ea5e9f commit 1edd231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 1edd231

Please sign in to comment.