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.
This commit is contained in:
parent
534d79adf9
commit
bcb8565f30
30 changed files with 183 additions and 6 deletions
|
@ -741,6 +741,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
let val = bx.tcx().sess.ub_checks();
|
||||
bx.cx().const_bool(val)
|
||||
}
|
||||
mir::NullOp::ContractChecks => {
|
||||
let val = bx.tcx().sess.contract_checks();
|
||||
bx.cx().const_bool(val)
|
||||
}
|
||||
};
|
||||
let tcx = self.cx.tcx();
|
||||
OperandRef {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue