Skip to content

Commit 509bec8

Browse files
committed
Change headers in Traits section of the book
1 parent d8acb03 commit 509bec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ As you can see, the `trait` block looks very similar to the `impl` block,
4747
but we don’t define a body, just a type signature. When we `impl` a trait,
4848
we use `impl Trait for Item`, rather than just `impl Item`.
4949

50-
## Traits bounds for generic functions
50+
## Trait constraints on generic functions
5151

5252
Traits are useful because they allow a type to make certain promises about its
5353
behavior. Generic functions can exploit this to constrain the types they
@@ -155,7 +155,7 @@ We get a compile-time error:
155155
error: the trait `HasArea` is not implemented for the type `_` [E0277]
156156
```
157157

158-
## Traits bounds for generic structs
158+
## Trait constraints on generic structs
159159

160160
Your generic structs can also benefit from trait constraints. All you need to
161161
do is append the constraint when you declare type parameters. Here is a new

0 commit comments

Comments
 (0)