@@ -298,11 +298,11 @@ pub trait Machine<'tcx>: Sized {
298298 interp_ok ( ( ) )
299299 }
300300
301- /// Determines the result of a `NullaryOp::UbChecks ` invocation.
302- fn ub_checks ( _ecx : & InterpCx < ' tcx , Self > ) -> InterpResult < ' tcx , bool > ;
303-
304- /// Determines the result of a `NullaryOp::ContractChecks` invocation.
305- fn contract_checks ( _ecx : & InterpCx < ' tcx , Self > ) -> InterpResult < ' tcx , bool > ;
301+ /// Determines the result of a `NullaryOp::RuntimeChecks ` invocation.
302+ fn runtime_checks (
303+ _ecx : & InterpCx < ' tcx , Self > ,
304+ r : mir :: RuntimeChecks ,
305+ ) -> InterpResult < ' tcx , bool > ;
306306
307307 /// Called when the interpreter encounters a `StatementKind::ConstEvalCounter` instruction.
308308 /// You can use this to detect long or endlessly running programs.
@@ -681,14 +681,10 @@ pub macro compile_time_machine(<$tcx: lifetime>) {
681681 }
682682
683683 #[ inline( always) ]
684- fn ub_checks ( _ecx : & InterpCx < $tcx, Self > ) -> InterpResult < $tcx, bool > {
685- // We can't look at `tcx.sess` here as that can differ across crates, which can lead to
686- // unsound differences in evaluating the same constant at different instantiation sites.
687- interp_ok ( true )
688- }
689-
690- #[ inline( always) ]
691- fn contract_checks ( _ecx : & InterpCx < $tcx, Self > ) -> InterpResult < $tcx, bool > {
684+ fn runtime_checks (
685+ _ecx : & InterpCx < $tcx, Self > ,
686+ _r : mir:: RuntimeChecks ,
687+ ) -> InterpResult < $tcx, bool > {
692688 // We can't look at `tcx.sess` here as that can differ across crates, which can lead to
693689 // unsound differences in evaluating the same constant at different instantiation sites.
694690 interp_ok ( true )
0 commit comments