Function clippy_utils::ty::get_adt_inherent_method

source ·
pub fn get_adt_inherent_method<'a>(
    cx: &'a LateContext<'_>,
    ty: Ty<'_>,
    method_name: Symbol,
) -> Option<&'a AssocItem>
Expand description

Checks if a Ty<’_> has some inherent method Symbol.

This does not look for impls in the type’s Deref::Target type. If you need this, you should wrap this call in clippy_utils::ty::deref_chain().any(...).