Skip to main content

## get_adt_inherent_method

# Function 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(...)`.