rust/clippy_utils/src
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
..
ast_utils Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
mir Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
ast_utils.rs Merge commit '83e42a2337' into clippyup 2023-04-11 15:31:08 +02:00
attrs.rs Merge commit 'd5e2a7aca5' into clippyup 2023-03-24 14:26:19 +01:00
check_proc_macro.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-04-23 03:39:03 -07:00
comparisons.rs Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
consts.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-04-23 03:39:03 -07:00
diagnostics.rs Merge commit '4f3ab69ea0' into clippyup 2022-12-29 14:28:34 +01:00
eager_or_lazy.rs offset_of 2023-04-21 02:14:02 -07:00
higher.rs Restrict #[rustc_box] to Box::new calls 2023-03-02 02:42:19 +00:00
hir_utils.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-04-23 03:39:03 -07:00
lib.rs Auto merge of #10679 - y21:better-const-ctx-check, r=Jarcho 2023-04-23 13:33:51 +00:00
macros.rs Merge commit '83e42a2337' into clippyup 2023-04-11 15:31:08 +02:00
msrvs.rs Merge commit 'd5e2a7aca5' into clippyup 2023-03-24 14:26:19 +01:00
numeric_literal.rs Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
paths.rs Merge commit '83e42a2337' into clippyup 2023-04-11 15:31:08 +02:00
ptr.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
qualify_min_const_fn.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-04-23 03:39:03 -07:00
source.rs Merge commit 'd5e2a7aca5' into clippyup 2023-03-24 14:26:19 +01:00
str_utils.rs Merge commit '0eff589afc' into clippyup 2021-12-30 15:10:43 +01:00
sugg.rs offset_of 2023-04-21 02:14:02 -07:00
sym_helper.rs Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
ty.rs Remove very useless as_substs usage from clippy 2023-04-18 17:39:08 +00:00
usage.rs rustc_hir: Relax lifetime requirements on Visitor::visit_path 2022-12-01 17:04:02 +03:00
visitors.rs offset_of 2023-04-21 02:14:02 -07:00