rust-lang / rust-lang/reference
Document the rules for const UB
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
In https://github.com/rust-lang/rfcs/blob/master/text/3016-const-ub.md we decided on the rules for const UB. In particular, a compile error is not guaranteed when a const has UB. I think this is currently not (yet) reflected anywhere in the Reference.
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 text/3016-const-ub.md in the Rust RFC repository, then search the Rust Reference for existing const-evaluation or undefined-behavior rules. Document that RFC 3016's rules apply, including that a const with UB does not necessarily produce a compile error; done means the Reference clearly reflects these rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100