rust-lang / rust-lang/reference
Clarify wording of orphan rule to avoid ambiguity
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
https://doc.rust-lang.org/reference/items/implementations.html#orphan-rules
"The orphan rule states that a trait implementation is only allowed if either the trait or at least one of the types in the implementation is defined in the current crate."
To me (non native English speaker, Rust learner) this sentence is ambiguous, in that "is defined" could be taken to mean both "is being defined" and "is already defined elsewhere than", which have opposite meanings.
I suggest this small change (in italics):
"The orphan rule states that a trait implementation is only allowed if either the trait or at least one of the types in the implementation is originally declared in the current crate."
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 linked Rust Reference orphan-rules section and review the quoted sentence in context. Done means the wording is revised to remove the ambiguity while preserving the rule's meaning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100