Module clippy_utils::hir_utils
source Β· StructsΒ§
- Type used to check whether two ast are the same. This is different from the operator
==on ast types as this operator would compare true equality with ID and span. - Type used to hash an ast element. This is different from the
Hashtrait on ast types as this trait would consider IDs and spans.
FunctionsΒ§
- Checks if the two
Options are bothNoneor some equal values as pereq_fn. - Counts how many elements of the slices are equal as per
eq_fn. - Checks if two expressions evaluate to the same value, and donβt contain any side effects.
- eq_span_tokens π
- Checks if two slices are equal as per
eq_fn. - reduce_exprkind πSome simple reductions like
{ return }=>return - swap_binop π
Type AliasesΒ§
- SpanlessEqCallback πCallback that is called when two expressions are not equal in the sense of
SpanlessEq, but other conditions would make them equal.