@@ -298,11 +298,11 @@ pub trait Machine<'tcx>: Sized {
298
298
interp_ok ( ( ) )
299
299
}
300
300
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 > ;
306
306
307
307
/// Called when the interpreter encounters a `StatementKind::ConstEvalCounter` instruction.
308
308
/// You can use this to detect long or endlessly running programs.
@@ -681,14 +681,10 @@ pub macro compile_time_machine(<$tcx: lifetime>) {
681
681
}
682
682
683
683
#[ 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 > {
692
688
// We can't look at `tcx.sess` here as that can differ across crates, which can lead to
693
689
// unsound differences in evaluating the same constant at different instantiation sites.
694
690
interp_ok ( true )
0 commit comments