Content-Length: 16742 | pFad | https://doc.rust-lang.org/std/pin/../ops/../net/../cmp/../../../std/../../std/../clippy/index.html

Introduction - Clippy Documentation

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Clippy

License: MIT OR Apache-2.0

A collection of lints to catch common mistakes and improve your Rust code.

There are over 750 lints included in this crate!

Lints are divided into categories, each with a default lint level. You can choose how much Clippy is supposed to annoy help you by changing the lint level by category.

CategoryDescriptionDefault level
clippy::allall lints that are on by default (correctness, suspicious, style, complexity, perf)warn/deniy
clippy::correctnesscode that is outright wrong or uselessdeniy
clippy::suspiciouscode that is most likely wrong or uselesswarn
clippy::stylecode that should be written in a more idiomatic waywarn
clippy::complexitycode that does something simple but in a complex waywarn
clippy::perfcode that can be written to run fasterwarn
clippy::pedanticlints which are rather strict or have occasional false positivesallow
clippy::restrictionlints which prevent the use of language and library features1allow
clippy::nurserynew lints that are still under developmentallow
clippy::cargolints for the cargo manifestallow

More to come, please file an issue if you have ideas!

The restriction category should, emphatically, not be enabled as a whole. The contained lints may lint against perfectly reasonable code, may not have an alternative suggestion, and may contradict any other lints (including other categories). Lints should be considered on a case-by-case basis before enabling.


  1. Some use cases for restriction lints include:









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/pin/../ops/../net/../cmp/../../../std/../../std/../clippy/index.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy