]> git.lizzy.rs Git - rust.git/blob - src/docs/empty_structs_with_brackets.txt
Auto merge of #9475 - Nemo157:mod-files-remap, r=xFrednet
[rust.git] / src / docs / empty_structs_with_brackets.txt
1 ### What it does
2 Finds structs without fields (a so-called "empty struct") that are declared with brackets.
3
4 ### Why is this bad?
5 Empty brackets after a struct declaration can be omitted.
6
7 ### Example
8 ```
9 struct Cookie {}
10 ```
11 Use instead:
12 ```
13 struct Cookie;
14 ```