clippy_utils::ty

Function deref_chain

source
pub fn deref_chain<'cx, 'tcx>(
    cx: &'cx LateContext<'tcx>,
    ty: Ty<'tcx>,
) -> impl Iterator<Item = Ty<'tcx>> + 'cx
Expand description

Returns the deref chain of a type, starting with the type itself.