Skip to content

Commit 8b86f8e

Browse files
committed
Ch. 10.1: further clarify graf about methods in impl<T> ... blocks
1 parent 7982ad0 commit 8b86f8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ch10-01-syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ generic type after `impl`, Rust can identify that the type in the angle
210210
brackets in `Point` is a generic type rather than a concrete type. We could
211211
have chosen a different name for this generic parameter than the generic
212212
parameter declared in the struct definition, but using the same name is
213-
conventional. If there is a method written within an `impl` that declares the generic type,
214-
that method will be defined on any instance of the type, no matter what concrete type ends
215-
up substituting for the generic type.
213+
conventional. Within an `impl` that declares a generic type, each method you
214+
write will be defined on any instance of the type, no matter what concrete type
215+
ends up substituting for the generic type.
216216

217217
We can also specify constraints on generic types when defining methods on the
218218
type. We could, for example, implement methods only on `Point<f32>` instances

0 commit comments

Comments
 (0)