diff options
| author | bors <bors@rust-lang.org> | 2024-05-04 00:32:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-04 00:32:27 +0000 |
| commit | 3cdc951b0b04ca9549d4eca69dc91722efe6f5a8 (patch) | |
| tree | 3640efae6841a4f15dc014727349faec7e21bc64 | |
| parent | 80c6f8ff7bf3d16f3d05171c7fe770c9164f0140 (diff) | |
| parent | b1a4f8725795b3e7be5f461a937dbb8b35641013 (diff) | |
| download | rust-3cdc951b0b04ca9549d4eca69dc91722efe6f5a8.tar.gz rust-3cdc951b0b04ca9549d4eca69dc91722efe6f5a8.zip | |
Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot
Some hir cleanups It seemed odd to not put `AnonConst` in the arena, compared with the other types that we did put into an arena. This way we can also give it a `Span` without growing a lot of other HIR data structures because of the extra field. r? compiler
| -rw-r--r-- | clippy_utils/src/hir_utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs index 07c443acb05..c921168df29 100644 --- a/clippy_utils/src/hir_utils.rs +++ b/clippy_utils/src/hir_utils.rs @@ -224,7 +224,7 @@ impl HirEqInterExpr<'_, '_, '_> { }) } - pub fn eq_array_length(&mut self, left: ArrayLen, right: ArrayLen) -> bool { + pub fn eq_array_length(&mut self, left: ArrayLen<'_>, right: ArrayLen<'_>) -> bool { match (left, right) { (ArrayLen::Infer(..), ArrayLen::Infer(..)) => true, (ArrayLen::Body(l_ct), ArrayLen::Body(r_ct)) => self.eq_body(l_ct.body, r_ct.body), @@ -1116,7 +1116,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { } } - pub fn hash_array_length(&mut self, length: ArrayLen) { + pub fn hash_array_length(&mut self, length: ArrayLen<'_>) { match length { ArrayLen::Infer(..) => {}, ArrayLen::Body(anon_const) => self.hash_body(anon_const.body), |
