Skip to content

Commit cc940e1

Browse files
committed
correct mistakes
1 parent 7fc2178 commit cc940e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1.6/ja/book/raw-pointers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ println!("raw points at {}", points_at);
9393

9494
# FFI
9595

96-
Raw pointers are useful for FFI: Rust’s `*const T` and `*mut T` are similar to
96+
<!-- Raw pointers are useful for FFI: Rust’s `*const T` and `*mut T` are similar to
9797
C’s `const T*` and `T*`, respectively. For more about this use, consult the
98-
[FFI chapter][ffi].
98+
[FFI chapter][ffi]. -->
9999
生ポインタはFFIを使う際に役立ちます。Rustの `*const T``*mut T` はそれぞれC言語の `const T*``T*` に似ているからです。これの使い方に関する詳細は、 [FFIの章][ffi] を参照してください。
100100

101101
[ffi]: ffi.html
@@ -117,7 +117,7 @@ satisfy the aliasing and mutability laws of references. The compiler assumes
117117
these properties are true for any references, no matter how they are created,
118118
and so any conversion from raw pointers is asserting that they hold. The
119119
programmer *must* guarantee this. -->
120-
逆に、 `*const` から 参照 `&` へ遡るのは安全ではありません。 `&T` は常に有効であるため、最低でも `*const T` は型 `T` の有効な実体を指さなければならないのです。その上、ポインタは参照のエイリアシングとミュータビリティの規則も満たす必要があります。コンパイラはあらゆる参照についてこれらのプロパティが真であると仮定しており、その生成方法によらず適用するため、生ポインタからのあらゆる変換もまた真であると断言します。プログラマがこのことを保証 _しなければならない_ のです。
120+
逆に、 `*const` から 参照 `&` へ遡るのは安全ではありません。 `&T` は常に有効であるため、最低でも `*const T` は型 `T` の有効な実体を指さなければならないのです。その上、ポインタは参照のエイリアシングとミュータビリティの規則も満たす必要があります。コンパイラはあらゆる参照についてこれらのプロパティが真であると仮定しており、その生成方法によらず適用するため、生ポインタからのあらゆる変換もまた真であると断言します。プログラマがこのことを保証 *しなければならない* のです。
121121

122122
<!-- The recommended method for the conversion is: -->
123123
おすすめの変換の方法は以下のとおりです。

0 commit comments

Comments
 (0)