]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/lints/groups.md
Rollup merge of #87528 - :stack_overflow_obsd, r=joshtriplett
[rust.git] / src / doc / rustc / src / lints / groups.md
1 # Lint Groups
2
3 `rustc` has the concept of a "lint group", where you can toggle several warnings
4 through one name.
5
6 For example, the `nonstandard-style` lint sets `non-camel-case-types`,
7 `non-snake-case`, and `non-upper-case-globals` all at once. So these are
8 equivalent:
9
10 ```bash
11 $ rustc -D nonstandard-style
12 $ rustc -D non-camel-case-types -D non-snake-case -D non-upper-case-globals
13 ```
14
15 Here's a list of each lint group, and the lints that they are made up of:
16
17 {{groups-table}}
18
19 Additionally, there's a `bad-style` lint group that's a deprecated alias for `nonstandard-style`.
20
21 Finally, you can also see the table above by invoking `rustc -W help`. This will give you the exact values for the specific
22 compiler you have installed.