rust-lang / rust-lang/rust

Unit type docs should say it implements Clone and Copy

Open Beginner friendly
#160,935 2 comments 1 reaction 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.