rust/clippy_utils
bors 496c11005c Auto merge of #10679 - y21:better-const-ctx-check, r=Jarcho
use `is_inside_const_context` for `in_constant` util fn

Fixes #10452.

This PR improves the `in_constant` util function to detect more cases of const contexts. Previously this function would not detect cases like expressions in array length position or expression in an inline const block `const { .. }`.

changelog: [`bool_to_int_with_if`]: recognize array length operand as being in a const context and don't suggest `usize::from` there
2023-04-23 13:33:51 +00:00
..
src Auto merge of #10679 - y21:better-const-ctx-check, r=Jarcho 2023-04-23 13:33:51 +00:00
Cargo.toml Bump Clippy version -> 0.1.71 2023-04-23 03:39:19 -07:00