Module hir_utils

Source

Structs§

HirEqInterExpr
SpanlessEq
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.
SpanlessHash
Type used to hash an ast element. This is different from the Hash trait on ast types as this trait would consider IDs and spans.

Enums§

PathCheck
Determines how paths are hashed and compared for equality.

Functions§

both
Checks if the two Options are both None or some equal values as per eq_fn.
both_some_and
Checks if the two Options are both Some and pass the predicate function.
count_eq
Counts how many elements of the slices are equal as per eq_fn.
eq_expr_value
Checks if two expressions evaluate to the same value, and don’t contain any side effects.
eq_span_tokens πŸ”’
generic_path_segments πŸ”’
Returns the segments of a path that might have generic parameters. Usually just the last segment for free items, except for when the path resolves to an associated item, in which case it is the last two
hash_expr
hash_stmt
is_bool
over
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.