Skip to content

Commit 9d8a439

Browse files
pnkfelixcelinval
authored andcommitted
Contracts core intrinsics.
These are hooks to: 1. control whether contract checks are run 2. allow 3rd party tools to intercept and reintepret the results of running contracts.
1 parent 0909002 commit 9d8a439

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/machine.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,11 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
11501150
interp_ok(ecx.tcx.sess.ub_checks())
11511151
}
11521152

1153+
#[inline(always)]
1154+
fn contract_checks(ecx: &InterpCx<'tcx, Self>) -> InterpResult<'tcx, bool> {
1155+
interp_ok(ecx.tcx.sess.contract_checks())
1156+
}
1157+
11531158
#[inline(always)]
11541159
fn thread_local_static_pointer(
11551160
ecx: &mut MiriInterpCx<'tcx>,

0 commit comments

Comments
 (0)