contracts: added lang items that act as hooks for rustc-injected code to invoke.
see test for an example of the kind of injected code that is anticipated here.
This commit is contained in:
parent
bcb8565f30
commit
777def87d5
5 changed files with 90 additions and 0 deletions
|
@ -418,6 +418,10 @@ language_item_table! {
|
|||
|
||||
String, sym::String, string, Target::Struct, GenericRequirement::None;
|
||||
CStr, sym::CStr, c_str, Target::Struct, GenericRequirement::None;
|
||||
|
||||
// Experimental lang items for implementing contract pre- and post-condition checking.
|
||||
ContractBuildCheckEnsures, sym::contract_build_check_ensures, contract_build_check_ensures_fn, Target::Fn, GenericRequirement::None;
|
||||
ContractCheckRequires, sym::contract_check_requires, contract_check_requires_fn, Target::Fn, GenericRequirement::None;
|
||||
}
|
||||
|
||||
pub enum GenericRequirement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue