rustc_contracts: differentiate between exhaustive and non-exhaustive contracts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Tracking Issue: https://github.com/rust-lang/rust/issues/128044
exhaustive: the contract fully encodes all requirements for using the function safely.
non-exhaustive: there are some additional safety pre-conditions or post-conditions that are not described by the contract, ie. it is possible to cause UB while fufilling the contract's requirements.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked tracking issue, rust-lang/rust#128044, for the existing rustc_contracts design and implementation context. Clarify how exhaustive and non-exhaustive contracts should be represented and checked, then confirm that the resulting behavior distinguishes fully encoded safety requirements from contracts with additional unstated preconditions or postconditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100