Confusing use of the term "undefined behavior" in the note of `type.str.value`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- documentation
Direzione di ricerca
Inizia dalla nota in src/types/str.md alle righe collegate, quindi leggi la sezione introduttiva citata su ciò che Reference non documenta. Modifica la nota in modo che non usi “undefined behavior” per il comportamento della libreria standard, mantenendo l’avvertenza sui buffer non UTF-8; il lavoro è completato quando la terminologia distingue chiaramente gli aspetti del linguaggio da quelli della libreria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The note of type.str.value uses the term "undefined behavior" for what is usually denoted as "library undefined behavior" (which is by the way not a concept in the reference):
I believe this is confusing. The term "undefined behavior" in the reference should only be used for what is usually denoted as "language undefined behavior" since the reference is about the language. It is explicitly said in the introduction (under "what the reference is not") that the standard library is not documented by the reference:
Unless there is already a plan to talk about library UB in the reference (which I guess would be restricted to notes), I believe it would be preferable to avoid the terminology "undefined behavior" for library UB, and use a more evasive terminology, like "calling a str method with a non-UTF-8 buffer violates assumptions and invariants of the standard library and could result in unexpected behaviors down the line".
- Lingua principale
- Rust
- Stelle
- 1.6k
- Fork
- 607
- Merge medio
- 6h 47m
- PR unite (30g)
- 14
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/reference
-
A-const-eval A-undefined-behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
A-resolve
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
A-coercions
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Define *target* ApertaA-glossary
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Tutte le issue di rust-lang/reference
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug core
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
linebender/vello_svg#90 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100