about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/contracts.rs
AgeCommit message (Collapse)AuthorLines
2025-02-10Fix imports, remove attrs for unused_*Michael Goulet-4/+2
2025-02-10Stop using span hack for contracts feature gatingMichael Goulet-12/+9
2025-02-03Rename rustc_contract to contractCelina G. Val-3/+3
This has now been approved as a language feature and no longer needs a `rustc_` prefix. Also change the `contracts` feature to be marked as incomplete and `contracts_internals` as internal.
2025-02-03Refactor contract builtin macro + error handlingCelina G. Val-71/+71
Instead of parsing the different components of a function signature, eagerly look for either the `where` keyword or the function body. - Also address feedback to use `From` instead of `TryFrom` in cranelift contract and ubcheck codegen.
2025-02-03Separate contract feature gates for the internal machineryFelix S. Klock II-8/+12
The extended syntax for function signature that includes contract clauses should never be user exposed versus the interface we want to ship externally eventually.
2025-02-03Desugars contract into the internal AST extensionsFelix S. Klock II-0/+172
Check ensures on early return due to Try / Yeet Expand these two expressions to include a call to contract checking