Skip to content

Commit f16d587

Browse files
committed
w
1 parent b2277d6 commit f16d587

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/trait-bounds.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ The type parameter `T` is required to outlive `'a` for the type `&'a T` to be we
167167
This is inferred because the function signature contains the type `&'a T` which is
168168
only valid if `T: 'a` holds.
169169

170-
Rust adds implied bounds for all parameters and outputs of functions. Inside of `requires_t_outlives_a`
170+
Implied bounds are added for all parameters and outputs of functions. Inside of `requires_t_outlives_a`
171171
you can assume `T: 'a` to hold even if you don't explicitly specify this:
172172
```rust
173173
fn requires_t_outlives_a_not_implied<'a, T: 'a>() {}
@@ -188,7 +188,8 @@ fn not_implied<'a, T>() {
188188
}
189189
```
190190

191-
Only lifetime bounds are implied, trait bounds still have to be explicitly added. The following example therefore causes an error:
191+
Only lifetime bounds are implied, trait bounds still have to be explicitly added.
192+
The following example therefore causes an error:
192193
```rust,compile_fail
193194
use std::fmt::Debug;
194195
struct IsDebug<T: Debug>(T);

0 commit comments

Comments
 (0)