Skip to content

Commit 2e64881

Browse files
authored
Rollup merge of #147752 - fee1-dead-contrib:sgtypo, r=chenyukang
style-guide: fix typo for empty struct advice the advice appears to apply to empty structs with braces (parens/blocks), and a unit struct in the comment does not make sense. Fix the typo.
2 parents 84063bd + 74ac3ec commit 2e64881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct Foo {
123123
Prefer using a unit struct (e.g., `struct Foo;`) to an empty struct (e.g.,
124124
`struct Foo();` or `struct Foo {}`, these only exist to simplify code
125125
generation), but if you must use an empty struct, keep it on one line with no
126-
space between the braces: `struct Foo;` or `struct Foo {}`.
126+
space between the braces: `struct Foo();` or `struct Foo {}`.
127127

128128
The same guidelines are used for untagged union declarations.
129129

0 commit comments

Comments
 (0)