rust-lang / rust-lang/reference
CTFE Undefined Behavior
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Some undefined behavior found during CTFE is now treated as an error as of https://github.com/rust-lang/rust/pull/86194. I think https://github.com/rust-lang/reference/blob/master/src/const_eval.md should detail which errors are detected, but Ralf indicated in https://github.com/rust-lang/rust/pull/86194#issuecomment-864803029 that they don't want to make any guarantees about which UB is detected. I can understand that, but it also leaves the language a little under specified. I'm not sure how to resolve that.
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 src/const_eval.md, Rust PR #86194, and Ralf's linked comment to understand the existing behavior and the concern about guarantees. The issue does not define a resolution; progress would require deciding whether the Reference should document detected CTFE errors or explicitly describe the behavior as unspecified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100