commit
277b59c0b3
3 changed files with 7 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
a143517d44cac50b20cbd3a0b579addab40dd399
|
||||
d1462d8558cf4551608457f63d9b999185ebf3bf
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ pub fn report_error<'tcx, 'mir>(
|
|||
) -> Option<i64> {
|
||||
use InterpError::*;
|
||||
|
||||
let (title, helps) = match &e.kind {
|
||||
let (title, helps) = match &e.kind() {
|
||||
MachineStop(info) => {
|
||||
let info = info.downcast_ref::<TerminationInfo>().expect("invalid MachineStop payload");
|
||||
use TerminationInfo::*;
|
||||
|
|
@ -81,7 +81,7 @@ pub fn report_error<'tcx, 'mir>(
|
|||
(title, helps)
|
||||
}
|
||||
_ => {
|
||||
let title = match e.kind {
|
||||
let title = match e.kind() {
|
||||
Unsupported(_) =>
|
||||
"unsupported operation",
|
||||
UndefinedBehavior(_) =>
|
||||
|
|
@ -93,11 +93,11 @@ pub fn report_error<'tcx, 'mir>(
|
|||
_ =>
|
||||
bug!("This error should be impossible in Miri: {}", e),
|
||||
};
|
||||
let helps = match e.kind {
|
||||
let helps = match e.kind() {
|
||||
Unsupported(UnsupportedOpInfo::NoMirFor(..)) =>
|
||||
vec![format!("make sure to use a Miri sysroot, which you can prepare with `cargo miri setup`")],
|
||||
Unsupported(UnsupportedOpInfo::ReadBytesAsPointer | UnsupportedOpInfo::ThreadLocalStatic(_) | UnsupportedOpInfo::ReadExternStatic(_)) =>
|
||||
panic!("Error should never be raised by Miri: {:?}", e.kind),
|
||||
panic!("Error should never be raised by Miri: {:?}", e.kind()),
|
||||
Unsupported(_) =>
|
||||
vec![format!("this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support")],
|
||||
UndefinedBehavior(UndefinedBehaviorInfo::AlignmentCheckFailed { .. })
|
||||
|
|
@ -133,7 +133,7 @@ pub fn report_error<'tcx, 'mir>(
|
|||
}
|
||||
|
||||
// Extra output to help debug specific issues.
|
||||
match e.kind {
|
||||
match e.kind() {
|
||||
UndefinedBehavior(UndefinedBehaviorInfo::InvalidUninitBytes(Some(access))) => {
|
||||
eprintln!(
|
||||
"Uninitialized read occurred at offsets 0x{:x}..0x{:x} into this allocation:",
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
|
|||
Ok(v) => v,
|
||||
Err(err) => {
|
||||
err.print_backtrace();
|
||||
panic!("Miri initialization error: {}", err.kind)
|
||||
panic!("Miri initialization error: {}", err.kind())
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue