clippy_utils

Function is_path_lang_item

source
pub fn is_path_lang_item<'tcx>(
    cx: &LateContext<'_>,
    maybe_path: &impl MaybePath<'tcx>,
    lang_item: LangItem,
) -> bool
Expand description

If maybe_path is a path node which resolves to an item, resolves it to a DefId and checks if it matches the given lang item.