Clarify wording of orphan rule to avoid ambiguity

Aperta
#1,998 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
58/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
documentation

Direzione di ricerca

Inizia dalla sezione collegata sulle orphan-rules della Rust Reference e rivedi la frase citata nel suo contesto. Il lavoro è completato quando la formulazione è stata rivista per rimuovere l'ambiguità, preservando il significato della regola.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Rust
Stelle
1.6k
Fork
618
Merge medio
5h 48m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-lang/reference

Tutte le issue di rust-lang/reference

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.