File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed
diff-1.6.0..1.9.0/src/doc/book Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ let x: Option<f64> = Some(5);
54
54
// found `core::option::Option<_>` (expected f64 but found integral variable)
55
55
```
56
56
57
- <!-- That doesn’t mean we can’t make `Option<T>`s that hold an `f64`! They just have -->
57
+ <!-- That doesn’t mean we can’t make `Option<T>`s that hold an `f64`! They have -->
58
58
<!-- to match up: -->
59
59
これは ` f64 ` を保持する ` Option<T> ` が作れないという意味ではありませんからね!
60
60
リテラルと宣言の型をぴったり合わせなければなりません。
@@ -157,9 +157,9 @@ let float_origin = Point { x: 0.0, y: 0.0 };
157
157
<!-- and we then use `x: T` in the type declaration, too. -->
158
158
関数と同様に、 ` <T> ` がジェネリックパラメータを宣言する場所であり、型宣言において ` x: T ` を使うのも同じです。
159
159
160
- <!-- When you want to add an implementation for the generic `struct`, you just -->
160
+ <!-- When you want to add an implementation for the generic `struct`, you -->
161
161
<!-- declare the type parameter after the `impl`: -->
162
- ジェネリックな ` struct ` に実装を追加したい場合、 ` impl ` の後に型パラメータを宣言するだけです 。
162
+ ジェネリックな ` struct ` に実装を追加したい場合、 ` impl ` の後に型パラメータを宣言します 。
163
163
164
164
``` rust
165
165
# struct Point <T > {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments