about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-04 00:32:27 +0000
committerbors <bors@rust-lang.org>2024-05-04 00:32:27 +0000
commit09cd00fea4aecaa6707f122d7e143196b8a12ee2 (patch)
tree6a761042886683a93980d152908945b361349519 /src/tools
parentd2d24e395a1e4fcee62ca17bf4cbddb1f903af97 (diff)
parentfea1fe7f01e99e0ef9eb6ceac8c97fb17ff3263e (diff)
downloadrust-09cd00fea4aecaa6707f122d7e143196b8a12ee2.tar.gz
rust-09cd00fea4aecaa6707f122d7e143196b8a12ee2.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
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/clippy/clippy_utils/src/hir_utils.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs
index 07c443acb05..c921168df29 100644
--- a/src/tools/clippy/clippy_utils/src/hir_utils.rs
+++ b/src/tools/clippy/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),