@@ -377,12 +377,12 @@ type VeryLongType<T, U: SomeBound>
377
377
= AnEvenLongerType <T , U , Foo <T >>;
378
378
```
379
379
380
- Where possible avoid ` where ` clauses and keep type constraints inline. Where
381
- that is not possible, prefer a trailing ` where ` clause over one that precedes
382
- the type. Split the line before and after a trailing ` where ` clause (and split
383
- the ` where ` clause as normal) and indent before the ` = ` and type, e.g.,
380
+ When there is a trailing ` where ` clause after the type, and no ` where ` clause
381
+ present before the type, break before the ` = ` and indent. Then break before the
382
+ ` where ` keyword and format the clauses normally, e.g.,
384
383
385
384
``` rust
385
+ // With only a trailing where clause
386
386
type VeryLongType <T , U >
387
387
= AnEvenLongerType <T , U , Foo <T >>
388
388
where
@@ -392,9 +392,12 @@ where
392
392
393
393
When there is a ` where ` clause before the type, format it normally, and break
394
394
after the last clause. Do not indent before the ` = ` to leave it visually
395
- distinct from the indented clauses.
395
+ distinct from the indented clauses that precede it. If there is additionally a
396
+ ` where ` clause after the type, break before the ` where ` keyword and format the
397
+ clauses normally.
396
398
397
- ```
399
+ ``` rust
400
+ // With only a preceding where clause.
398
401
type WithPrecedingWC <T , U >
399
402
where
400
403
T : U :: AnAssociatedType ,
0 commit comments