@@ -295,11 +295,11 @@ pub trait Machine<'tcx>: Sized {
295
295
interp_ok ( ( ) )
296
296
}
297
297
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 > ;
303
303
304
304
/// Called when the interpreter encounters a `StatementKind::ConstEvalCounter` instruction.
305
305
/// You can use this to detect long or endlessly running programs.
@@ -673,14 +673,10 @@ pub macro compile_time_machine(<$tcx: lifetime>) {
673
673
}
674
674
675
675
#[ 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 > {
684
680
// We can't look at `tcx.sess` here as that can differ across crates, which can lead to
685
681
// unsound differences in evaluating the same constant at different instantiation sites.
686
682
interp_ok ( true )
0 commit comments