Inspectopedia Help

Lints

Cast can be replaced with literal suffix   New in this release

Detects as casts that can be replaced with literal suffixes.

Deprecated element  

Detects the item marked with #[deprecated(...)] attribute, which is discouraged from using, typically because it is dangerous, or because a better alternative exists.

Ineffective path statements   New in this release

Detects path statements with no effect.

Liveness analysis   New in this release

Reports unused local variables and parameters.

Non-shorthand field pattern   New in this release

Detects using Struct { x: x } instead of Struct { x } in a pattern.

Redundant `#[must_use]`   New in this release

Checks for a #[must_use] attribute without further information on functions and methods that return a type already marked as #[must_use].

Redundant semicolons   New in this release

Detects unnecessary trailing semicolons.

Unknown crate types   New in this release

Detects an unknown crate type found in a crate_type attribute.

Unnecessary cast   New in this release

Detects unnecessary as casts.

Unnecessary lifetime annotations   New in this release

Checks for lifetime annotations which can be removed by relying on lifetime elision.

Unnecessary parentheses  

Detects unnecessary parentheses.

Unnecessary path prefix   New in this release

Detects unnecessarily qualified paths.

Unnecessary return   New in this release

Reports unnecessary return statements at the end of a block.

Unreachable code  

Reports unreachable code.

Unreachable patterns   New in this release

Checks that match expression doesn't have unreachable patterns.

Unused `#[must_use]`   New in this release

Detects unused result of a type flagged as #[must_use].

Unused `mut` modifier   New in this release

Detects unnecessary mut qualifiers.

Unused import  

Detects unused use directives.

Unused labels   New in this release

Detects labels that are never used.

Unwrap can be replaced with `?`   New in this release

Reports calls to `unwrap()` that can be replaced with `?`.

`while true` can be replaced with `loop`   New in this release

Detects while loops which can be replaced with loop.

Naming conventions  

Sub-group of 18 inspections that provide checks for Naming conventions

Last modified: 11 September 2024