From eefeff552eb24fbe8f86a145c4af2731b844cd91 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Tue, 14 Oct 2025 02:52:59 +0100 Subject: [PATCH] mgca: Add ConstArg representation for const items --- clippy_utils/src/ast_utils/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clippy_utils/src/ast_utils/mod.rs b/clippy_utils/src/ast_utils/mod.rs index 839b46325b5e..f5e61e365c57 100644 --- a/clippy_utils/src/ast_utils/mod.rs +++ b/clippy_utils/src/ast_utils/mod.rs @@ -358,7 +358,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool { ident: li, generics: lg, ty: lt, - expr: le, + body: lb, define_opaque: _, }), Const(box ConstItem { @@ -366,7 +366,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool { ident: ri, generics: rg, ty: rt, - expr: re, + body: rb, define_opaque: _, }), ) => { @@ -374,7 +374,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool { && eq_id(*li, *ri) && eq_generics(lg, rg) && eq_ty(lt, rt) - && eq_expr_opt(le.as_deref(), re.as_deref()) + && both(lb.as_deref(), rb.as_deref(), |l, r| eq_anon_const(l, r)) }, ( Fn(box ast::Fn { @@ -612,7 +612,7 @@ pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool { ident: li, generics: lg, ty: lt, - expr: le, + body: lb, define_opaque: _, }), Const(box ConstItem { @@ -620,7 +620,7 @@ pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool { ident: ri, generics: rg, ty: rt, - expr: re, + body: rb, define_opaque: _, }), ) => { @@ -628,7 +628,7 @@ pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool { && eq_id(*li, *ri) && eq_generics(lg, rg) && eq_ty(lt, rt) - && eq_expr_opt(le.as_deref(), re.as_deref()) + && both(lb.as_deref(), rb.as_deref(), |l, r| eq_anon_const(l, r)) }, ( Fn(box ast::Fn {