Inspectopedia 2025.2 Help

Lints

`while true` can be replaced with `loop`  

Detects while loops which can be replaced with loop.

Cast can be replaced with literal suffix  

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  

Detects path statements with no effect.

Liveness analysis  

Reports unused local variables and parameters.

Non-shorthand field pattern  

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

Redundant `#[must_use]`  

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

Redundant semicolons  

Detects unnecessary trailing semicolons.

Unknown crate types  

Detects an unknown crate type found in a crate_type attribute.

Unnecessary cast  

Detects unnecessary as casts.

Unnecessary lifetime annotations  

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

Unnecessary parentheses  

Detects unnecessary parentheses.

Unnecessary path prefix  

Detects unnecessarily qualified paths.

Unnecessary return  

Reports unnecessary return statements at the end of a block.

Unreachable code  

Reports unreachable code.

Unreachable patterns  

Checks that match expression doesn't have unreachable patterns.

Unused `#[must_use]`  

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

Unused `mut` modifier  

Detects unnecessary mut qualifiers.

Unused import  

Detects unused use directives.

Unused labels  

Detects labels that are never used.

Unwrap can be replaced with `?`  

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

Naming conventions  

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

Last modified: 29 July 2025