diff --git a/rust-version b/rust-version index 208d29f79704..189317a54a35 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -a143517d44cac50b20cbd3a0b579addab40dd399 +d1462d8558cf4551608457f63d9b999185ebf3bf diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 3f1f67218fdb..45c0996355bf 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -54,7 +54,7 @@ pub fn report_error<'tcx, 'mir>( ) -> Option { use InterpError::*; - let (title, helps) = match &e.kind { + let (title, helps) = match &e.kind() { MachineStop(info) => { let info = info.downcast_ref::().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:", diff --git a/src/eval.rs b/src/eval.rs index b6d4fa05e1e5..16fe5d5f20a1 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -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()) } };