File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ The type parameter `T` is required to outlive `'a` for the type `&'a T` to be we
167
167
This is inferred because the function signature contains the type ` &'a T ` which is
168
168
only valid if ` T: 'a ` holds.
169
169
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 `
171
171
you can assume ` T: 'a ` to hold even if you don't explicitly specify this:
172
172
``` rust
173
173
fn requires_t_outlives_a_not_implied <'a , T : 'a >() {}
@@ -188,7 +188,8 @@ fn not_implied<'a, T>() {
188
188
}
189
189
```
190
190
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:
192
193
``` rust,compile_fail
193
194
use std::fmt::Debug;
194
195
struct IsDebug<T: Debug>(T);
You can’t perform that action at this time.
0 commit comments