diff options
| author | Michael Goulet <michael@errs.io> | 2023-08-16 16:40:12 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-08-16 16:42:20 +0000 |
| commit | 85254c9dd8266f24658071b773fbc3ba2da7b35c (patch) | |
| tree | c871da64037204e02a56f91731a7b211b655f3d2 | |
| parent | c57393e4f8b88444fbf0985a81a2d662862f2733 (diff) | |
bugfix: reflect how rustfmt formats type aliases
| -rw-r--r-- | src/doc/style-guide/src/items.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/style-guide/src/items.md b/src/doc/style-guide/src/items.md index a6d941f6d04..b93f2fbde4d 100644 --- a/src/doc/style-guide/src/items.md +++ b/src/doc/style-guide/src/items.md @@ -367,14 +367,14 @@ where ## Type aliases Keep type aliases on one line when they fit. If necessary to break the line, do -so after the `=`, and block-indent the right-hand side: +so before the `=`, and block-indent the right-hand side: ```rust pub type Foo = Bar<T>; // If multi-line is required -type VeryLongType<T, U: SomeBound> = - AnEvenLongerType<T, U, Foo<T>>; +type VeryLongType<T, U: SomeBound> + = AnEvenLongerType<T, U, Foo<T>>; ``` Where possible avoid `where` clauses and keep type constraints inline. Where |
