Skip to content

Clarify wording of orphan rule to avoid ambiguity #1998

@MrOnijohn

Description

@MrOnijohn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions