File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 8
8
<!-- represents a certain number of `T` in sequence. But we don’t know how many -->
9
9
<!-- there are, so the size is not known. -->
10
10
ほとんどの型はコンパイル時に知れる、バイト数で測った、サイズがあります。
11
- 例えば 、 ` i32 ` 型は、32ビット(4バイト)というサイズです。
11
+ たとえば 、 ` i32 ` 型は、32ビット(4バイト)というサイズです。
12
12
しかしながら、表現のためには便利であってもサイズが定まっていない型が存在します。
13
13
そのような型を 「サイズ不定」又は「動的サイズ」型と呼びます。
14
14
一例を上げると ` [T] ` 型は 一定のサイズの` T ` のシーケンスを意味していますが、その要素数については規定されていないため、サイズは不定となります。
@@ -59,7 +59,7 @@ impl Foo for &str {
59
59
<!-- some point, there are some bugs to fix first) user-defined custom smart -->
60
60
<!-- pointers, can use this `impl`. -->
61
61
このように書いたとすると、このコードは [ 参照] [ ref ] に対してのみ動作するようになり、他のポインタ型に対しては動作しないことになります。
62
- ` imp for str ` のように書くことで、すべてのポインタ、ユーザーの定義した独自のスマートポインタ( いくつかの点についてバグがあるので、それをまずは直さなくてはなりませんが) もこの ` impl ` を利用可能になります。
62
+ ` imp for str ` のように書くことで、すべてのポインタ、ユーザーの定義した独自のスマートポインタ( いくつかの点についてバグがあるので、それをまずは直さなくてはなりませんが) もこの ` impl ` を利用可能になります。
63
63
64
64
[ ref ] : references-and-borrowing.html
65
65
You can’t perform that action at this time.
0 commit comments