rust-lang / rust-lang/rust

std's api docs should defines overflowing/wrapping/saturating

Open
#163,061 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

A-docs E-easy needs-triage
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Location (URL)

https://doc.rust-lang.org/std/primitive.i8.html#method.saturating_add etc. lacks the definition of overflowing / wrapping / saturating operations.

Summary

C++ 26's saturating_add links to wikipedia, which is a good idea. We can do things similar, maybe in a dedicated page somewhere.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the linked i8 saturating_add documentation and compare the overflowing, wrapping, and saturating operation entries in the standard library API docs. Review the linked C++ reference and Wikipedia terminology, then determine whether shared definitions or links belong on a dedicated page. Done means the relevant std documentation clearly defines all three operation types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.