Function clippy_utils::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