Skip to content

Commit 8acf459

Browse files
authored
Fix other-repers.md (#18)
* Obey to translation table * Fix typo * Obey to translation table * Fix conversion error
1 parent fde8563 commit 8acf459

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/other-reprs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ On non-C-like enums, this will inhibit certain optimizations like the null-
7474
pointer optimization.
7575
-->
7676

77-
C っぽくない enum (訳注:要素がパラメタをとるような enum)に `repr(u*)` を適用すると、
78-
null ポインタ最適化のようなある種の最適化ができなくなります
77+
C っぽくない enum (訳注:要素がパラメータをとるような enum)に `repr(u*)` を適用すると、
78+
ヌルポインタ最適化のようなある種の最適化ができなくなります
7979

8080
<!--
8181
These reprs have no effect on a struct.
@@ -96,7 +96,7 @@ byte. This may improve the memory footprint, but will likely have other negative
9696
side-effects.
9797
-->
9898

99-
`repr(packed)` を使うと Rust はパディングを一切取り除き、すべてを byte 単位にアラインします
99+
`repr(packed)` を使うと Rust はパディングを一切取り除き、すべてをバイト単位にアラインします
100100
メモリ使用量は改善しますが、悪い副作用を引き起こす可能性が高いです。
101101

102102
<!--
@@ -108,12 +108,12 @@ However if you take a reference to a packed field, it's unlikely that the
108108
compiler will be able to emit code to avoid an unaligned load.
109109
-->
110110

111-
特にほとんどのアークテクチャは、値がアラインされていることを*強く*望んでいます。
111+
特にほとんどのアーキテクチャは、値がアラインされていることを*強く*望んでいます。
112112
つまりアラインされていないデータの読み込みにはペナルティがある(x86)かもしれませんし、
113113
失敗する(いくつかの ARM チップ)かもしれません。
114114
パックされたフィールドを直接読んだり書いたりするという単純なケースでは、
115115
コンパイラがシフトやマスクを駆使してアラインメントの問題を隠してくれるかもしれません。
116-
しかし、パックされたフィールドへのリファレンスを扱う場合には、アラインされてない読み込みを避けるような
116+
しかし、パックされたフィールドへの参照を扱う場合には、アラインされてない読み込みを避けるような
117117
コードをコンパイラが生成することは期待できないでしょう。
118118

119119

@@ -122,7 +122,7 @@ compiler will be able to emit code to avoid an unaligned load.
122122
`repr(packed)` は気軽に使えるものではありません。
123123
極端な要求に応えようとしているのでない限り、使うべきではありません。
124124

125-
この repr は `repr(C)``repr(rust)` の就職誌として使えます
125+
この repr は `repr(C)``repr(rust)` の修飾子として使えます
126126

127127
[drop flags]: drop-flags.md
128128
[ub loads]: https://github.com/rust-lang/rust/issues/27060

0 commit comments

Comments
 (0)