@@ -22,18 +22,18 @@ other pointer types. They: -->
22
22
23
23
<!-- - are not guaranteed to point to valid memory and are not even
24
24
guaranteed to be non-null (unlike both `Box` and `&`); -->
25
- - 有効なメモリを指していることが保証されないどころか、nullでないことも保証されない( ` Box ` と ` & ` では保証される)
26
25
<!-- - do not have any automatic clean-up, unlike `Box`, and so require
27
26
manual resource management; -->
28
- - ` Box ` とは異なり、自動的な後処理が一切行われないため、手動のリソース管理が必要
29
27
<!-- - are plain-old-data, that is, they don't move ownership, again unlike
30
28
`Box`, hence the Rust compiler cannot protect against bugs like
31
29
use-after-free; -->
32
- - plain-old-dataであるため、Rustコンパイラはuse-after-freeのようなバグから保護できない
33
30
<!-- - lack any form of lifetimes, unlike `&`, and so the compiler cannot
34
31
reason about dangling pointers; and
35
32
- have no guarantees about aliasing or mutability other than mutation
36
33
not being allowed directly through a `*const T`. -->
34
+ - 有効なメモリを指していることが保証されないどころか、nullでないことも保証されない( ` Box ` と ` & ` では保証される)
35
+ - ` Box ` とは異なり、自動的な後処理が一切行われないため、手動のリソース管理が必要
36
+ - plain-old-dataであるため、Rustコンパイラはuse-after-freeのようなバグから保護できない
37
37
- ` & ` と異なり、ライフタイムの機能が無効化されるため、コンパイラはダングリングポインタを推論できない
38
38
- また、 ` *const T ` を直接介した変更は拒むが、それ以外のエイリアシングやミュータビリティに関する保証はない
39
39
@@ -121,6 +121,7 @@ programmer *must* guarantee this. -->
121
121
122
122
<!-- The recommended method for the conversion is: -->
123
123
おすすめの変換の方法は以下のとおりです。
124
+
124
125
``` rust
125
126
# // explicit cast
126
127
// 明示的キャスト
0 commit comments