File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ An *associated type declaration* declares a signature for associated type
208208definitions. It is written in one of the following forms, where ` Assoc ` is the
209209name of the associated type, ` Params ` is a comma-separated list of type,
210210lifetime or const parameters, ` Bounds ` is a plus-separated list of trait bounds
211- on the associated type, and ` WhereBounds ` is a comma-separated list of bounds on
212- parameters:
211+ that the associated type must meet , and ` WhereBounds ` is a comma-separated list
212+ of bounds that the parameters must meet :
213213
214214<!-- ignore: illustrative example forms -->
215215``` rust,ignore
@@ -337,6 +337,18 @@ impl<T> Container for Vec<T> {
337337}
338338```
339339
340+ ### Relationship between ` Bounds ` and ` WhereBounds `
341+
342+ In this example:
343+
344+ ``` rust
345+ trait Example {
346+ type Output <T >: Ord where T : Debug
347+ }
348+ ```
349+
350+ Given a reference to the associated type like ` <X as Example>::Output<Y> ` , the associated type itself must be ` Ord ` , and the type ` Y ` must be ` Debug ` .
351+
340352### Required where clauses on generic associated types
341353
342354Generic associated type declarations on traits currently may require a list of
You can’t perform that action at this time.
0 commit comments