Function clippy_utils::get_parent_expr_for_hir

source ·
pub fn get_parent_expr_for_hir<'tcx>(
    cx: &LateContext<'tcx>,
    hir_id: HirId
) -> Option<&'tcx Expr<'tcx>>
Expand description

This retrieves the parent for the given HirId if it’s an expression. This is useful for constraint lints