fmt
This commit is contained in:
parent
31d9ac14f5
commit
f57b41519d
@ -272,26 +272,24 @@ pub fn report_error<'tcx, 'mir>(
|
|||||||
} else {
|
} else {
|
||||||
let title = match e.kind() {
|
let title = match e.kind() {
|
||||||
UndefinedBehavior(UndefinedBehaviorInfo::ValidationError(validation_err))
|
UndefinedBehavior(UndefinedBehaviorInfo::ValidationError(validation_err))
|
||||||
if matches!(validation_err.kind, ValidationErrorKind::PointerAsInt { .. } | ValidationErrorKind::PartialPointer) =>
|
if matches!(
|
||||||
|
validation_err.kind,
|
||||||
|
ValidationErrorKind::PointerAsInt { .. } | ValidationErrorKind::PartialPointer
|
||||||
|
) =>
|
||||||
{
|
{
|
||||||
ecx.handle_ice(); // print interpreter backtrace
|
ecx.handle_ice(); // print interpreter backtrace
|
||||||
bug!("This validation error should be impossible in Miri: {}", ecx.format_error(e));
|
bug!("This validation error should be impossible in Miri: {}", ecx.format_error(e));
|
||||||
}
|
}
|
||||||
UndefinedBehavior(_) =>
|
UndefinedBehavior(_) => "Undefined Behavior",
|
||||||
"Undefined Behavior",
|
ResourceExhaustion(_) => "resource exhaustion",
|
||||||
ResourceExhaustion(_) =>
|
|
||||||
"resource exhaustion",
|
|
||||||
Unsupported(
|
Unsupported(
|
||||||
// We list only the ones that can actually happen.
|
// We list only the ones that can actually happen.
|
||||||
UnsupportedOpInfo::Unsupported(_) | UnsupportedOpInfo::UnsizedLocal
|
UnsupportedOpInfo::Unsupported(_) | UnsupportedOpInfo::UnsizedLocal,
|
||||||
) =>
|
) => "unsupported operation",
|
||||||
"unsupported operation",
|
|
||||||
InvalidProgram(
|
InvalidProgram(
|
||||||
// We list only the ones that can actually happen.
|
// We list only the ones that can actually happen.
|
||||||
InvalidProgramInfo::AlreadyReported(_) |
|
InvalidProgramInfo::AlreadyReported(_) | InvalidProgramInfo::Layout(..),
|
||||||
InvalidProgramInfo::Layout(..)
|
) => "post-monomorphization error",
|
||||||
) =>
|
|
||||||
"post-monomorphization error",
|
|
||||||
_ => {
|
_ => {
|
||||||
ecx.handle_ice(); // print interpreter backtrace
|
ecx.handle_ice(); // print interpreter backtrace
|
||||||
bug!("This error should be impossible in Miri: {}", ecx.format_error(e));
|
bug!("This error should be impossible in Miri: {}", ecx.format_error(e));
|
||||||
@ -346,7 +344,8 @@ pub fn report_error<'tcx, 'mir>(
|
|||||||
extra,
|
extra,
|
||||||
"Uninitialized memory occurred at {alloc_id:?}{range:?}, in this allocation:",
|
"Uninitialized memory occurred at {alloc_id:?}{range:?}, in this allocation:",
|
||||||
range = access.bad,
|
range = access.bad,
|
||||||
).unwrap();
|
)
|
||||||
|
.unwrap();
|
||||||
writeln!(extra, "{:?}", ecx.dump_alloc(*alloc_id)).unwrap();
|
writeln!(extra, "{:?}", ecx.dump_alloc(*alloc_id)).unwrap();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user