File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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
167167This is inferred because the function signature contains the type ` &'a T ` which is
168168only 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 `
171171you can assume ` T: 'a ` to hold even if you don't explicitly specify this:
172172``` rust
173173fn 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
193194use std::fmt::Debug;
194195struct IsDebug<T: Debug>(T);
You can’t perform that action at this time.
0 commit comments