Skip to content

Commit 85254c9

Browse files
bugfix: reflect how rustfmt formats type aliases
1 parent c57393e commit 85254c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/style-guide/src/items.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,14 @@ where
367367
## Type aliases
368368

369369
Keep type aliases on one line when they fit. If necessary to break the line, do
370-
so after the `=`, and block-indent the right-hand side:
370+
so before the `=`, and block-indent the right-hand side:
371371

372372
```rust
373373
pub type Foo = Bar<T>;
374374

375375
// If multi-line is required
376-
type VeryLongType<T, U: SomeBound> =
377-
AnEvenLongerType<T, U, Foo<T>>;
376+
type VeryLongType<T, U: SomeBound>
377+
= AnEvenLongerType<T, U, Foo<T>>;
378378
```
379379

380380
Where possible avoid `where` clauses and keep type constraints inline. Where

0 commit comments

Comments
 (0)