Skip to content

Commit 82f469f

Browse files
committed
Auto merge of rust-lang#96546 - nnethercote:overhaul-MacArgs, r=petrochenkov
Overhaul `MacArgs` Motivation: - Clarify some code that I found hard to understand. - Eliminate one use of three places where `TokenKind::Interpolated` values are created. r? `@petrochenkov`
2 parents 8be86fc + c318cf4 commit 82f469f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_utils/src/ast_utils.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,8 @@ pub fn eq_mac_args(l: &MacArgs, r: &MacArgs) -> bool {
688688
match (l, r) {
689689
(Empty, Empty) => true,
690690
(Delimited(_, ld, lts), Delimited(_, rd, rts)) => ld == rd && lts.eq_unspanned(rts),
691-
(Eq(_, lt), Eq(_, rt)) => lt.kind == rt.kind,
691+
(Eq(_, MacArgsEq::Ast(le)), Eq(_, MacArgsEq::Ast(re))) => eq_expr(le, re),
692+
(Eq(_, MacArgsEq::Hir(ll)), Eq(_, MacArgsEq::Hir(rl))) => ll.kind == rl.kind,
692693
_ => false,
693694
}
694695
}

0 commit comments

Comments
 (0)