Lint Groups - The rustc book

# Lint Groups

`rustc` has the concept of a "lint group", where you can toggle several warnings through one name.

For example, the `nonstandard-style` lint sets `non-camel-case-types`, `non-snake-case`, and `non-upper-case-globals` all at once. So these are equivalent:

    $ rustc -D nonstandard-style
    $ rustc -D non-camel-case-types -D non-snake-case -D non-upper-case-globals

Here's a list of each lint group, and the lints that they are made up of:

Group | Description | Lints
--- | --- | ---
warnings | All lints that are set to issue warnings | See warn-by-default for the default set of warnings
future-incompatible | Lints that detect code that has future-compatibility problems | absolute-paths-not-starting-with-crate, ambiguous-associated-items, anonymous-parameters, array-into-iter, cenum-impl-drop-cast, coherence-leak-check, conflicting-repr-hints, const-evaluatable-unchecked, forbidden-lint-groups, ill-formed-attribute-input, illegal-floating-point-literal-pattern, indirect-structural-match, invalid-type-param-default, keyword-idents, late-bound-lifetime-arguments, macro-expanded-macro-exports-accessed-by-absolute-paths, missing-fragment-specifier, mutable-borrow-reservation-conflict, nontrivial-structural-match, order-dependent-trait-objects, patterns-in-fns-without-body, pointer-structural-match, private-in-public, proc-macro-derive-resolution-fallback, pub-use-of-private-extern-crate, safe-packed-borrows, soft-unstable, tyvar-behind-raw-pointer, uninhabited-static, unstable-name-collisions, unsupported-naked-functions, where-clauses-object-safety
nonstandard-style | Violation of standard naming conventions | non-camel-case-types, non-snake-case, non-upper-case-globals
rust-2018-compatibility | Lints used to transition code from the 2015 edition to 2018 | absolute-paths-not-starting-with-crate, anonymous-parameters, keyword-idents, tyvar-behind-raw-pointer
rust-2018-idioms | Lints to nudge you toward idiomatic features of Rust 2018 | bare-trait-objects, elided-lifetimes-in-paths, ellipsis-inclusive-range-patterns, explicit-outlives-requirements, unused-extern-crates
rustdoc | Rustdoc-specific lints | broken-intra-doc-links, invalid-codeblock-attributes, invalid-html-tags, missing-doc-code-examples, non-autolinks, private-doc-tests, private-intra-doc-links
unused | Lints that detect things being declared but not used, or excess syntax | dead-code, path-statements, redundant-semicolons, unreachable-code, unreachable-patterns, unused-allocation, unused-assignments, unused-attributes, unused-braces, unused-doc-comments, unused-extern-crates, unused-features, unused-imports, unused-labels, unused-macros, unused-must-use, unused-mut, unused-parens, unused-unsafe, unused-variables

Additionally, there's a `bad-style` lint group that's a deprecated alias for `nonstandard-style`.

Finally, you can also see the table above by invoking `rustc -W help`. This will give you the exact values for the specific compiler you have installed.