miri/diagnostics: don't forget to print_backtrace when ICEing on unexpected errors

then also use the new helper in a few other places
This commit is contained in:
Ralf Jung 2023-08-27 14:41:35 +02:00
parent b60f7b51a2
commit beeb2b13cc
5 changed files with 57 additions and 44 deletions

View file

@ -273,7 +273,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
// dedicated error variants should be introduced instead.
assert!(
!error.kind().formatted_string(),
"const-prop encountered formatting error: {error:?}",
"const-prop encountered formatting error: {}",
self.ecx.format_error(error),
);
None
}