Skip to content

Commit 5f9f0b7

Browse files
committed
Auto merge of #28266 - jackwilsonv:patch-4, r=steveklabnik
r? @steveklabnik
2 parents de63207 + 3ccc253 commit 5f9f0b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/generics.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ enum Option<T> {
1717
```
1818

1919
The `<T>` part, which you’ve seen a few times before, indicates that this is
20-
a generic data type. Inside the declaration of our enum, wherever we see a `T`,
20+
a generic data type. Inside the declaration of our `enum`, wherever we see a `T`,
2121
we substitute that type for the same type used in the generic. Here’s an
2222
example of using `Option<T>`, with some extra type annotations:
2323

@@ -115,10 +115,10 @@ let int_origin = Point { x: 0, y: 0 };
115115
let float_origin = Point { x: 0.0, y: 0.0 };
116116
```
117117

118-
Similarly to functions, the `<T>` is where we declare the generic parameters,
118+
Similar to functions, the `<T>` is where we declare the generic parameters,
119119
and we then use `x: T` in the type declaration, too.
120120

121-
When you want to add an implementation for the generic struct, you just
121+
When you want to add an implementation for the generic `struct`, you just
122122
declare the type parameter after the `impl`:
123123

124124
```rust

0 commit comments

Comments
 (0)