@@ -295,11 +295,11 @@ pub trait Machine<'tcx>: Sized {
295295 interp_ok ( ( ) )
296296 }
297297
298- /// Determines the result of a `NullaryOp::UbChecks ` invocation.
299- fn ub_checks ( _ecx : & InterpCx < ' tcx , Self > ) -> InterpResult < ' tcx , bool > ;
300-
301- /// Determines the result of a `NullaryOp::ContractChecks` invocation.
302- fn contract_checks ( _ecx : & InterpCx < ' tcx , Self > ) -> InterpResult < ' tcx , bool > ;
298+ /// Determines the result of a `NullaryOp::RuntimeChecks ` invocation.
299+ fn runtime_checks (
300+ _ecx : & InterpCx < ' tcx , Self > ,
301+ r : mir :: RuntimeChecks ,
302+ ) -> InterpResult < ' tcx , bool > ;
303303
304304 /// Called when the interpreter encounters a `StatementKind::ConstEvalCounter` instruction.
305305 /// You can use this to detect long or endlessly running programs.
@@ -673,14 +673,10 @@ pub macro compile_time_machine(<$tcx: lifetime>) {
673673 }
674674
675675 #[ inline( always) ]
676- fn ub_checks ( _ecx : & InterpCx < $tcx, Self > ) -> InterpResult < $tcx, bool > {
677- // We can't look at `tcx.sess` here as that can differ across crates, which can lead to
678- // unsound differences in evaluating the same constant at different instantiation sites.
679- interp_ok ( true )
680- }
681-
682- #[ inline( always) ]
683- fn contract_checks ( _ecx : & InterpCx < $tcx, Self > ) -> InterpResult < $tcx, bool > {
676+ fn runtime_checks (
677+ _ecx : & InterpCx < $tcx, Self > ,
678+ _r : mir:: RuntimeChecks ,
679+ ) -> InterpResult < $tcx, bool > {
684680 // We can't look at `tcx.sess` here as that can differ across crates, which can lead to
685681 // unsound differences in evaluating the same constant at different instantiation sites.
686682 interp_ok ( true )
0 commit comments