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:
committed by
Celina G. Val
parent
534d79adf9
commit
bcb8565f30
@@ -709,6 +709,10 @@ impl Session {
|
||||
self.opts.unstable_opts.ub_checks.unwrap_or(self.opts.debug_assertions)
|
||||
}
|
||||
|
||||
pub fn contract_checks(&self) -> bool {
|
||||
self.opts.unstable_opts.contract_checks.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn relocation_model(&self) -> RelocModel {
|
||||
self.opts.cg.relocation_model.unwrap_or(self.target.relocation_model)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user