fn get_field_equality_expr(cx: &ExtCtxt<'_>, field: &FieldInfo) -> P<Expr>
Expand description
Generates an equality comparison expression for a single struct or enum field.
This function produces an AST expression that compares the self
and
other
values for a field using ==
. It removes any leading references
from both sides for readability. If the field is a block expression, it is
wrapped in parentheses to ensure valid syntax.
ยงPanics
Panics if there are not exactly two arguments to compare (should be self
and other
).