Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#![warn(warnings)] is redundant #10

Open
epage opened this issue Apr 6, 2018 · 0 comments
Open

#![warn(warnings)] is redundant #10

epage opened this issue Apr 6, 2018 · 0 comments

Comments

@epage
Copy link
Contributor

epage commented Apr 6, 2018

From @CAD97 on April 5, 2018 13:55

The warnings warning group is a special warning group that includes the warnings which are set to the WARN level. Thus #![warn(warnings)] doesn't do anything.

The intent was probably to audit the ALLOW warnings such as unreachable_pub which should likely be enabled for new projects.

Lint checks provided by rustc:

                                         name  default  meaning
                                         ----  -------  -------
                         anonymous-parameters  allow    detects anonymous parameters
                                 box-pointers  allow    use of owned (Box type) heap memory
                      elided-lifetime-in-path  allow    hidden lifetime parameters are deprecated, try `Foo<'_>`
                 missing-copy-implementations  allow    detects potentially-forgotten implementations of `Copy`
                missing-debug-implementations  allow    detects missing implementations of fmt::Debug
                                 missing-docs  allow    detects missing documentation for public members
                          single-use-lifetime  allow    detects single use lifetimes
                                trivial-casts  allow    detects trivial casts which could be removed
                        trivial-numeric-casts  allow    detects trivial casts of numeric types which could be removed
                              unreachable-pub  allow    `pub` items not reachable from crate root
                                  unsafe-code  allow    usage of `unsafe` code
                            unstable-features  allow    enabling unstable features (deprecated. do not use)
                         unused-extern-crates  allow    extern crates that are never used
                         unused-import-braces  allow    unnecessary braces around an imported item
                        unused-qualifications  allow    detects unnecessarily qualified names
                               unused-results  allow    unused result of an expression in a statement
                     variant-size-differences  allow    detects enums with widely varying variant sizes
                                               [snip]


Lint groups provided by rustc:

                   name  sub-lints
                   ----  ---------
               warnings  all lints that are set to issue warnings
              bad-style  non-camel-case-types, non-snake-case, non-upper-case-globals
    future-incompatible  private-in-public, pub-use-of-private-extern-crate, patterns-in-fns-without-body, safe-extern-statics, invalid-type-param-default, legacy-directory-ownership, legacy-imports, legacy-constructor-visibility, resolve-trait-on-defaulted-unit, missing-fragment-specifier, illegal-floating-point-literal-pattern, anonymous-parameters, parenthesized-params-in-types-and-modules, late-bound-lifetime-arguments, safe-packed-borrows, incoherent-fundamental-impls, coerce-never, tyvar-behind-raw-pointer
                 unused  unused-imports, unused-variables, unused-assignments, dead-code, unused-mut, unreachable-code, unreachable-patterns, unused-must-use, unused-unsafe, path-statements, unused-attributes, unused-macros, unused-allocation, unused-doc-comment, unused-extern-crates, unused-features, unused-parens

We probably want to deny unsafe-code and warn for missing-debug-implementations, missing-docs, and unreachable-pub.

Copied from original issue: crate-ci/example-warn#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant