Function clippy_utils::peel_ref_operators

source ·
pub fn peel_ref_operators<'hir>(
    cx: &LateContext<'_>,
    expr: &'hir Expr<'hir>
) -> &'hir Expr<'hir>
Expand description

Removes AddrOf operators (&) or deref operators (*), but only if a reference type is dereferenced. An overloaded deref such as Vec to slice would not be removed.