Function clippy_utils::ty::match_type
source · pub fn match_type(cx: &LateContext<'_>, ty: Ty<'_>, path: &[&str]) -> bool
Expand description
Checks if type is struct, enum or union type with the given def path.
If the type is a diagnostic item, use is_type_diagnostic_item
instead.
If you change the signature, remember to update the internal lint MatchTypeOnDiagItem