Add `let_underscore_must_use` lint
changelog: closes#4812 , added a new `let_underscore_must_use` lint, moved `is_must_use_ty` to utils, added `is_must_use_fn` util function
Fix `map_clone` false positive
Don't lint when the item type is not a reference. `copied` only applies to references.
changelog: Fix `map_clone` false positive
Reduce cognitive complexity lint span
Currently the cognitive complexity lint spans the entire function body making it really difficult to read and refactor the code in editors. To fix this we reduce the lint span to the function name.
changelog: Reduce cognitive complexity lint span
Fixes#4241
Currently the cognitive complexity lint spans the entire function
body making it really difficult to read and refactor the code in
editors. To fix this we reduce the lint span to the function name.
Move `iterator_step_by_zero` and correct the documentation
Move `iterator_step_by_zero` and correct the documentation.
changelog: Corrected `iterator_step_by_zero` documentation
Fix 'redudant' spelling in redundant_clone docs
The word 'redundant' is spelled incorrectly in the **What it does** section of the redundant_clone lint's documentation.
changelog: Fix spelling in redundant_clone lint documentation
Detect comparisons with NAN constants
Currently `cmp_nan` lint doesn't detect comparisons with NaN's if the operands are consts variables so to fix this we evaluate the const variables first before testing for NaN.
changelog: Detect comparisons with NaN constants in `cmp_nan` lint
Fixes#1205
Currently `cmp_nan` lint doesn't detect comparisons with NaN's
if the operands are consts variables so to fix this we evaluate
the const variables first before testing for NaN.
Fix clippy build failure
Clippy build fails because the feature `result_map_or` has been stabilized in v1.41.0 but we still have an explicit feature attribute for it.
changelog: none
Fix false positive with cast_sign_loss lint
`cast_sign_loss` lint incorrectly suggests that the result of `checked_abs`, `rem_euclid` and `checked_rem_euclid` cannot be casted to an unsigned integer without loss.
Fixes#4818#4764#4743
changelog: Fix false positives in `cast_sign_loss` lint
Add lint to detect transmutes from float to integer
Add lint that detects transmutation from a float to an integer and suggests usage of `{f32, f64}.to_bits()` instead.
Fixes#3993
changelog: Add lint `transmute_float_to_int`