clippy_utils

Function get_expr_use_or_unification_node

Source
pub fn get_expr_use_or_unification_node<'tcx>(
    tcx: TyCtxt<'tcx>,
    expr: &Expr<'_>,
) -> Option<(Node<'tcx>, HirId)>
Expand description

Gets the node where an expression is either used, or it’s type is unified with another branch. Returns both the node and the HirId of the closest child node.