clippy_utils

Function path_def_id

Source
pub fn path_def_id<'tcx>(
    cx: &LateContext<'_>,
    maybe_path: &impl MaybePath<'tcx>,
) -> Option<DefId>
Expand description

If maybe_path is a path node which resolves to an item, retrieves the item ID