Skip to content

Commit

Permalink
Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed May 4, 2024
2 parents 35aa211 + 324c3ae commit 797b7d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_utils/src/hir_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 797b7d2

Please sign in to comment.