Skip to content

Commit c8d20e9

Browse files
authored
Clarify language items definition to include traits (#1458)
The current description states language items are "functions and types", but the example immediately given (Copy trait) is neither. This clarifies that language items include traits and other language elements.
2 parents 3c3e54f + 3bef110 commit c8d20e9

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

blog/content/edition-2/posts/01-freestanding-rust-binary/index.es.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ chapter = "Bare Bones"
99

1010
# GitHub usernames of the people that translated this post
1111
translators = ["dobleuber"]
12+
translation_contributors = ["richarddalves"]
1213
+++
1314

1415
El primer paso para crear nuestro propio kernel de sistema operativo es crear un ejecutable en Rust que no enlace con la biblioteca estándar. Esto hace posible ejecutar código Rust directamente en el [bare metal] sin un sistema operativo subyacente.
@@ -147,7 +148,7 @@ El [parámetro `PanicInfo`][PanicInfo] contiene el archivo y la línea donde ocu
147148

148149
## El Elemento de Lenguaje `eh_personality`
149150

150-
Los elementos de lenguaje son funciones y tipos especiales que el compilador requiere internamente. Por ejemplo, el trait [`Copy`] es un elemento de lenguaje que indica al compilador qué tipos tienen [_semántica de copia_][`Copy`]. Si observamos su [implementación][copy code], veremos que tiene el atributo especial `#[lang = "copy"]`, que lo define como un elemento de lenguaje.
151+
Los elementos de lenguaje son elementos especiales (traits, funciones, tipos, etc.) que el compilador requiere internamente. Por ejemplo, el trait [`Copy`] es un elemento de lenguaje que indica al compilador qué tipos tienen [_semántica de copia_][`Copy`]. Si observamos su [implementación][copy code], veremos que tiene el atributo especial `#[lang = "copy"]`, que lo define como un elemento de lenguaje.
151152

152153
[`Copy`]: https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html
153154
[copy code]: https://github.com/rust-lang/rust/blob/485397e49a02a3b7ff77c17e4a3f16c653925cb3/src/libcore/marker.rs#L296-L299

blog/content/edition-2/posts/01-freestanding-rust-binary/index.fr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ date = 2018-02-10
88
# Please update this when updating the translation
99
translation_based_on_commit = "3e87916b6c2ed792d1bdb8c0947906aef9013ac1"
1010
# GitHub usernames of the people that translated this post
11-
translators = ["AlexandreMarcq", "alaincao"]
11+
translators = ["AlexandreMarcq", "alaincao", "richarddalves"]
1212
+++
1313

1414
La première étape pour créer notre propre noyau de système d'exploitation est de créer un exécutable Rust qui ne relie pas la bibliothèque standard. Cela rend possible l'exécution du code Rust sur la ["bare machine"][machine nue] sans système d'exploitation sous-jacent.
@@ -145,7 +145,7 @@ Le [paramètre `PanicInfo`][PanicInfo] contient le fichier et la ligne où le pa
145145

146146
## L'Objet de Langage `eh_personality`
147147

148-
Les objets de langage sont des fonctions et des types spéciaux qui sont requis par le compilateur de manière interne. Par exemple, le trait [`Copy`] est un objet de langage qui indique au compilateur quels types possèdent la [sémantique copy][`Copy`]. Quand nous regardons l'[implémentation][copy code] du code, nous pouvons voir qu'il possède l'attribut spécial `#[lang = copy]` qui le définit comme étant un objet de langage.
148+
Les objets de langage sont des éléments spéciaux (traits, fonctions, types, etc.) qui sont requis par le compilateur de manière interne. Par exemple, le trait [`Copy`] est un objet de langage qui indique au compilateur quels types possèdent la [sémantique copy][`Copy`]. Quand nous regardons l'[implémentation][copy code] du code, nous pouvons voir qu'il possède l'attribut spécial `#[lang = copy]` qui le définit comme étant un objet de langage.
149149

150150
[`Copy`]: https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html
151151
[copy code]: https://github.com/rust-lang/rust/blob/485397e49a02a3b7ff77c17e4a3f16c653925cb3/src/libcore/marker.rs#L296-L299

blog/content/edition-2/posts/01-freestanding-rust-binary/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The [`PanicInfo` parameter][PanicInfo] contains the file and line where the pani
146146

147147
## The `eh_personality` Language Item
148148

149-
Language items are special functions and types that are required internally by the compiler. For example, the [`Copy`] trait is a language item that tells the compiler which types have [_copy semantics_][`Copy`]. When we look at the [implementation][copy code], we see it has the special `#[lang = "copy"]` attribute that defines it as a language item.
149+
Language items are special items (traits, functions, types, etc.) that are required internally by the compiler. For example, the [`Copy`] trait is a language item that tells the compiler which types have [_copy semantics_][`Copy`]. When we look at the [implementation][copy code], we see it has the special `#[lang = "copy"]` attribute that defines it as a language item.
150150

151151
[`Copy`]: https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html
152152
[copy code]: https://github.com/rust-lang/rust/blob/485397e49a02a3b7ff77c17e4a3f16c653925cb3/src/libcore/marker.rs#L296-L299

blog/content/edition-2/posts/01-freestanding-rust-binary/index.pt-BR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ O parâmetro [`PanicInfo`][PanicInfo] contém o arquivo e a linha onde o panic a
150150

151151
## O Item de Linguagem `eh_personality`
152152

153-
Items de linguagem são funções e tipos especiais necessários internamente pelo compilador. Por exemplo, a trait [`Copy`] é um item de linguagem que diz ao compilador quais tipos têm [_semântica de cópia_][`Copy`]. Quando olhamos para a [implementação][copy code], vemos que tem o atributo especial `#[lang = "copy"]` que o define como um item de linguagem (_Language Item_ em inglês).
153+
Items de linguagem são elementos especiais (traits, funções, tipos, etc.) necessários internamente pelo compilador. Por exemplo, a trait [`Copy`] é um item de linguagem que diz ao compilador quais tipos têm [_semântica de cópia_][`Copy`]. Quando olhamos para a [implementação][copy code], vemos que tem o atributo especial `#[lang = "copy"]` que o define como um item de linguagem (_Language Item_ em inglês).
154154

155155
[`Copy`]: https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html
156156
[copy code]: https://github.com/rust-lang/rust/blob/485397e49a02a3b7ff77c17e4a3f16c653925cb3/src/libcore/marker.rs#L296-L299

0 commit comments

Comments
 (0)