pub fn get_parent_expr_for_hir<'tcx>( cx: &LateContext<'tcx>, hir_id: HirId, ) -> Option<&'tcx Expr<'tcx>>
This retrieves the parent for the given HirId if it’s an expression. This is useful for constraint lints
HirId