Unit type docs should say it implements Clone and Copy
Open
Beginner friendly
Nobody has claimed this yet.
C-bug
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location (URL)
https://doc.rust-lang.org/stable/std/primitive.unit.html
Summary
The unit type () implements Clone + Copy, but this is not reflected in the documentation.
This compiles, proving it implements these traits:
fn is_copy<T: Clone + Copy>() {
is_copy::<()>()
}
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 with the unit type documentation at https://doc.rust-lang.org/stable/std/primitive.unit.html and locate its source in the Rust repository. Update the documentation so it reflects that () implements Clone and Copy, then build or check the standard-library documentation to confirm the rendered page shows the change.
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
- 72/100